【副本】isInMap字段删除bug修复
parent
2000240f64
commit
8df6de20e5
|
@ -352,7 +352,7 @@ end
|
|||
-- function this.OnGuessSuccess(msg)
|
||||
-- LogGreen("竞猜成功回调")
|
||||
-- if this.isLogin then return end--上来就弹新关卡界面 所以不弹
|
||||
-- if MapManager.isInMap or UIManager.IsOpen(UIName.BattlePanel) or UIManager.IsOpen(UIName.ArenaTopMatchPanel) then return end--在关卡里 副本里不弹 新加巅峰赛界面不弹
|
||||
-- if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) or UIManager.IsOpen(UIName.ArenaTopMatchPanel) then return end--在关卡里 副本里不弹 新加巅峰赛界面不弹
|
||||
-- UIManager.OpenPanel(UIName.GuessCoinDropPopup, msg.roundTimes, msg.itemId, msg.itemNum)
|
||||
-- end
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ function this.RefreshGuessTipView()
|
|||
|
||||
LogGreen("竞猜成功回调")
|
||||
if this.isLogin then return end--上来就弹新关卡界面 所以不弹
|
||||
if MapManager.isInMap or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹
|
||||
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹
|
||||
local IsCanBet = ArenaTopMatchManager.IsCanBet()
|
||||
if IsCanBet then -- 判断是否有竞猜信息
|
||||
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
||||
|
|
|
@ -226,7 +226,7 @@ function this:BindEvent()
|
|||
end
|
||||
|
||||
function this:LoseJump(id)
|
||||
if not MapManager.isInMap then
|
||||
if not MapManager.Mapping then
|
||||
if JumpManager.CheckJump(id) then
|
||||
this:ClosePanel()
|
||||
JumpManager.GoJumpWithoutTip(id)
|
||||
|
|
|
@ -168,7 +168,7 @@ function this:BindEvent()
|
|||
end
|
||||
|
||||
function this:LoseJump(id)
|
||||
if not MapManager.isInMap then
|
||||
if not MapManager.Mapping then
|
||||
if JumpManager.CheckJump(id) then
|
||||
this:ClosePanel()
|
||||
JumpManager.GoJumpWithoutTip(id)
|
||||
|
|
|
@ -132,11 +132,7 @@ end
|
|||
function this.InitActPowerShow()
|
||||
local total = EndLessMapManager.GetTotalEnergy()
|
||||
local curEnergy = 0
|
||||
-- if MapManager.isInMap then
|
||||
-- curEnergy = EndLessMapManager.leftEnergy
|
||||
-- else
|
||||
curEnergy = BagManager.GetItemCountById(1)
|
||||
-- end
|
||||
curEnergy = BagManager.GetItemCountById(1)
|
||||
|
||||
local color = curEnergy <= 5 and "FF0014FF" or "A0B2B2FF"
|
||||
local str = string.format("<color=#%s>%s</color>", color, tostring(curEnergy))
|
||||
|
@ -152,17 +148,9 @@ function this.RequestBlood(func)
|
|||
end
|
||||
|
||||
function this.EnterMap()
|
||||
-- if not MapManager.isInMap then
|
||||
-- 进入地图编队,重新赋值一遍
|
||||
CarbonManager.difficulty = CARBON_TYPE.ENDLESS
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId)
|
||||
|
||||
-- else
|
||||
-- -- 在地图里又没勾新手引导, 无法进图
|
||||
-- if MapManager.curMapId == 0 then
|
||||
-- PopupTipPanel.ShowTip(Language[10361])
|
||||
-- end
|
||||
-- end
|
||||
-- 进入地图编队,重新赋值一遍
|
||||
CarbonManager.difficulty = CARBON_TYPE.ENDLESS
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId)
|
||||
end
|
||||
|
||||
function this.InitCompShow()
|
||||
|
|
|
@ -294,7 +294,7 @@ end
|
|||
--事件触发拍脸 (如五星成长礼)
|
||||
function this.OnAddPatFaceData(faceConFigType, starUpGiftNum)
|
||||
if this.isLogin then return end--上来就弹新关卡界面 所以不弹
|
||||
if MapManager.isInMap or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹
|
||||
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹
|
||||
patFaceAllData = {}
|
||||
local allTypeFaceConFig = ConfigManager.GetAllConfigsDataByKey(ConfigName.LoginPosterConfig,"Type",faceConFigType)
|
||||
-- LogPink("faceConFigType 1--------- "..#allTypeFaceConFig.." "..tostring(starUpGiftNum))
|
||||
|
|
|
@ -37,7 +37,7 @@ end
|
|||
-- 扫荡按钮
|
||||
--- btn1点击回调事件
|
||||
function this.On_Btn1_Click()
|
||||
if CarbonManager.difficulty == 4 and MapManager.isInMap then
|
||||
if CarbonManager.difficulty == 4 and MapManager.Mapping then
|
||||
if this.root.order>=1 then
|
||||
--保存编队
|
||||
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
|
||||
|
|
|
@ -165,8 +165,8 @@ end
|
|||
|
||||
-- 刷新地图中的队伍数据
|
||||
function this.RefershMapTeam()
|
||||
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then
|
||||
--MapManager.formationList = this.RefreshTeamInfo()
|
||||
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.Mapping then
|
||||
MapManager.formationList = this.RefreshTeamInfo()
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -388,27 +388,14 @@ end
|
|||
--判断当前的行动力是已经是上限
|
||||
function this.EnergyEnough()
|
||||
-- 地图里用显示的数据,地图外面用背包的数据
|
||||
local curEnergy = 0
|
||||
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then
|
||||
curEnergy = this.leftEnergy
|
||||
else
|
||||
curEnergy = BagManager.GetItemCountById(1)
|
||||
end
|
||||
|
||||
local curEnergy = BagManager.GetItemCountById(1)
|
||||
local limitValue = this.GetTotalEnergy()
|
||||
return curEnergy >= limitValue
|
||||
end
|
||||
|
||||
-- 返回剩余行动力
|
||||
function this.GetLeftMapEnergy()
|
||||
local curEnergy = 0
|
||||
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then
|
||||
curEnergy = this.leftEnergy
|
||||
else
|
||||
curEnergy = BagManager.GetItemCountById(1)
|
||||
end
|
||||
|
||||
return curEnergy
|
||||
return BagManager.GetItemCountById(1)
|
||||
end
|
||||
|
||||
-- =================================================================================
|
||||
|
|
|
@ -64,7 +64,7 @@ end
|
|||
|
||||
--
|
||||
function NotEnoughPopup:Show(itemId, func)
|
||||
if not MapManager.isInMap and _JumpConfig[itemId] then
|
||||
if not MapManager.Mapping and _JumpConfig[itemId] then
|
||||
if itemId == 15 and not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP)then
|
||||
PopupTipPanel.ShowTip(Language[10847])
|
||||
return
|
||||
|
|
|
@ -102,7 +102,7 @@ function this.PlayerInfoRequest(func)
|
|||
PlayerManager.gem = msg.player.gem
|
||||
PlayerManager.chargeGem = msg.player.chargeGem
|
||||
PlayerManager.curMapId = msg.player.curMapId
|
||||
MapManager.isInMap = false --PlayerManager.curMapId ~= 0 and PlayerManager.curMapId > 100
|
||||
MapManager.Mapping = false --PlayerManager.curMapId ~= 0 and PlayerManager.curMapId > 100
|
||||
PlayerManager.maxForce = msg.player.maxForce
|
||||
-- RecruitManager.randCount = msg.randCount % 100 --钻石抽卡已招募次数 用不上了 协议没删
|
||||
RecruitManager.isTenRecruit = msg.firstTenth --首次十连
|
||||
|
@ -364,49 +364,48 @@ function this.MapInfoRequest(mapModeId,func)
|
|||
func(msg)
|
||||
end
|
||||
-- 请求进图后
|
||||
MapManager.isInMap = true
|
||||
MapManager.Mapping = true
|
||||
end)
|
||||
end
|
||||
|
||||
--请求地图离开
|
||||
function this.MapOutRequest(outType, func, nextMapId)
|
||||
local data = MapInfoProto_pb.MapOutRequest()
|
||||
data.curXY = MapManager.curPos
|
||||
data.mapId = MapManager.curMapId
|
||||
data.outType = outType
|
||||
-- --请求地图离开
|
||||
-- function this.MapOutRequest(outType, func, nextMapId)
|
||||
-- local data = MapInfoProto_pb.MapOutRequest()
|
||||
-- data.curXY = MapManager.curPos
|
||||
-- data.mapId = MapManager.curMapId
|
||||
-- data.outType = outType
|
||||
|
||||
-- 无尽副本使用
|
||||
local distMapId = 0
|
||||
if not nextMapId or nextMapId == 0 then
|
||||
distMapId = 0
|
||||
else
|
||||
distMapId = nextMapId
|
||||
end
|
||||
data.targetMapId = distMapId
|
||||
Log("data.targetMapId == " .. data.targetMapId)
|
||||
-- -- 无尽副本使用
|
||||
-- local distMapId = 0
|
||||
-- if not nextMapId or nextMapId == 0 then
|
||||
-- distMapId = 0
|
||||
-- else
|
||||
-- distMapId = nextMapId
|
||||
-- end
|
||||
-- data.targetMapId = distMapId
|
||||
-- Log("data.targetMapId == " .. data.targetMapId)
|
||||
|
||||
Log("MapOutRequest MapManager.curMapId " .. MapManager.curMapId)
|
||||
for i = 1, #MapManager.stepList do
|
||||
--将当前探索步骤传给后端同步校验
|
||||
data.cells:append(MapManager.stepList[i])
|
||||
end
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.MAP_OUT_REQUEST, MessageTypeProto_pb.MAP_OUT_RESPONSE, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = MapInfoProto_pb.MapOutResponse()
|
||||
msg:ParseFromString(data)
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
MapManager.stepList = {} --收到回调后,清空当前探索步骤
|
||||
MapManager.pointAtkPower = {}
|
||||
PlayerManager.curMapId = 0
|
||||
MapManager.curMapId = 0
|
||||
MapManager.isInMap = false
|
||||
MapTrialManager.SetBossState(0)
|
||||
end)
|
||||
end
|
||||
-- Log("MapOutRequest MapManager.curMapId " .. MapManager.curMapId)
|
||||
-- for i = 1, #MapManager.stepList do
|
||||
-- --将当前探索步骤传给后端同步校验
|
||||
-- data.cells:append(MapManager.stepList[i])
|
||||
-- end
|
||||
-- local msg = data:SerializeToString()
|
||||
-- Network:SendMessageWithCallBack(MessageTypeProto_pb.MAP_OUT_REQUEST, MessageTypeProto_pb.MAP_OUT_RESPONSE, msg, function(buffer)
|
||||
-- local data = buffer:DataByte()
|
||||
-- local msg = MapInfoProto_pb.MapOutResponse()
|
||||
-- msg:ParseFromString(data)
|
||||
-- if func then
|
||||
-- func(msg)
|
||||
-- end
|
||||
-- MapManager.stepList = {} --收到回调后,清空当前探索步骤
|
||||
-- MapManager.pointAtkPower = {}
|
||||
-- PlayerManager.curMapId = 0
|
||||
-- MapManager.curMapId = 0
|
||||
-- MapManager.Mapping = false
|
||||
-- MapTrialManager.SetBossState(0)
|
||||
-- end)
|
||||
-- end
|
||||
|
||||
-- -- 请求开始探索副本地图
|
||||
-- function this.CarbonMissionStartRequest(func)
|
||||
|
|
|
@ -133,7 +133,7 @@ function this.RefreshItemNumById(itemId)
|
|||
if isAddItem[itemId] then
|
||||
isAddItem[itemId] = false
|
||||
--地图里需要特殊处理 其他正常
|
||||
if itemId == 1 and CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then
|
||||
if itemId == 1 and CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.Mapping then
|
||||
if #MapManager.stepList > 0 then
|
||||
MapManager.MapUpdateEvent(-1000, function ()
|
||||
NetManager.RefreshEnergyRequest({itemId},function()
|
||||
|
|
|
@ -85,7 +85,7 @@ end
|
|||
|
||||
|
||||
function this:LoseJump(id)
|
||||
if not MapManager.isInMap then
|
||||
if not MapManager.Mapping then
|
||||
if JumpManager.CheckJump(id) then
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
|
|
|
@ -41,7 +41,7 @@ function JumpView:OnOpen(jumpId,isRewardItemPop)
|
|||
self:GoToJumpData()
|
||||
end)
|
||||
end
|
||||
if MapManager.isInMap or UIManager.IsOpen(UIName.BattlePanel) or isRewardItemPop == false then-- or BagManager.isBagPanel
|
||||
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) or isRewardItemPop == false then-- or BagManager.isBagPanel
|
||||
self.btnSure:SetActive(false)
|
||||
else
|
||||
self.btnSure:SetActive(true)
|
||||
|
|
|
@ -54,10 +54,6 @@ local _ShowPlusType = {
|
|||
|
||||
-- 判断是否显示加号
|
||||
local function _IsShowPlus(_type)
|
||||
-- 魂晶特殊处理,在地图中不显示 + 号
|
||||
if _type == UpViewRechargeType.SoulCrystal and MapManager.isInMap then
|
||||
return false
|
||||
end
|
||||
-- 判断是否是可购买的类型
|
||||
for _, type in ipairs(_ShowPlusType) do
|
||||
if type == _type then
|
||||
|
@ -313,7 +309,7 @@ function UpView:RechargeType(_type)
|
|||
UIManager.OpenPanel(UIName.ElementDrawCardPanel)
|
||||
elseif _type == UpViewRechargeType.DemonCrystal then
|
||||
-- 充值商店
|
||||
-- if not MapManager.isInMap then
|
||||
-- if not MapManager.Mapping then
|
||||
if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
|
||||
PopupTipPanel.ShowTip(Language[10438])
|
||||
return
|
||||
|
@ -324,7 +320,7 @@ function UpView:RechargeType(_type)
|
|||
-- end
|
||||
elseif _type == UpViewRechargeType.SoulCrystal then
|
||||
-- 充值商店
|
||||
if not MapManager.isInMap then
|
||||
if not MapManager.Mapping then
|
||||
if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
|
||||
PopupTipPanel.ShowTip(Language[10438])
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue