【副本】isInMap字段删除bug修复

dev_chengFeng
ZhangBiao 2020-11-16 15:24:09 +08:00
parent 2000240f64
commit 8df6de20e5
13 changed files with 57 additions and 87 deletions

View File

@ -352,7 +352,7 @@ end
-- function this.OnGuessSuccess(msg) -- function this.OnGuessSuccess(msg)
-- LogGreen("竞猜成功回调") -- LogGreen("竞猜成功回调")
-- if this.isLogin then return end--上来就弹新关卡界面 所以不弹 -- 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) -- UIManager.OpenPanel(UIName.GuessCoinDropPopup, msg.roundTimes, msg.itemId, msg.itemNum)
-- end -- end
@ -1059,7 +1059,7 @@ function this.RefreshGuessTipView()
LogGreen("竞猜成功回调") LogGreen("竞猜成功回调")
if this.isLogin then return end--上来就弹新关卡界面 所以不弹 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() local IsCanBet = ArenaTopMatchManager.IsCanBet()
if IsCanBet then -- 判断是否有竞猜信息 if IsCanBet then -- 判断是否有竞猜信息
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget() local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()

View File

@ -226,7 +226,7 @@ function this:BindEvent()
end end
function this:LoseJump(id) function this:LoseJump(id)
if not MapManager.isInMap then if not MapManager.Mapping then
if JumpManager.CheckJump(id) then if JumpManager.CheckJump(id) then
this:ClosePanel() this:ClosePanel()
JumpManager.GoJumpWithoutTip(id) JumpManager.GoJumpWithoutTip(id)

View File

@ -168,7 +168,7 @@ function this:BindEvent()
end end
function this:LoseJump(id) function this:LoseJump(id)
if not MapManager.isInMap then if not MapManager.Mapping then
if JumpManager.CheckJump(id) then if JumpManager.CheckJump(id) then
this:ClosePanel() this:ClosePanel()
JumpManager.GoJumpWithoutTip(id) JumpManager.GoJumpWithoutTip(id)

View File

@ -132,11 +132,7 @@ end
function this.InitActPowerShow() function this.InitActPowerShow()
local total = EndLessMapManager.GetTotalEnergy() local total = EndLessMapManager.GetTotalEnergy()
local curEnergy = 0 local curEnergy = 0
-- if MapManager.isInMap then
-- curEnergy = EndLessMapManager.leftEnergy
-- else
curEnergy = BagManager.GetItemCountById(1) curEnergy = BagManager.GetItemCountById(1)
-- end
local color = curEnergy <= 5 and "FF0014FF" or "A0B2B2FF" local color = curEnergy <= 5 and "FF0014FF" or "A0B2B2FF"
local str = string.format("<color=#%s>%s</color>", color, tostring(curEnergy)) local str = string.format("<color=#%s>%s</color>", color, tostring(curEnergy))
@ -152,17 +148,9 @@ function this.RequestBlood(func)
end end
function this.EnterMap() function this.EnterMap()
-- if not MapManager.isInMap then
-- 进入地图编队,重新赋值一遍 -- 进入地图编队,重新赋值一遍
CarbonManager.difficulty = CARBON_TYPE.ENDLESS CarbonManager.difficulty = CARBON_TYPE.ENDLESS
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId)
-- else
-- -- 在地图里又没勾新手引导, 无法进图
-- if MapManager.curMapId == 0 then
-- PopupTipPanel.ShowTip(Language[10361])
-- end
-- end
end end
function this.InitCompShow() function this.InitCompShow()

View File

@ -294,7 +294,7 @@ end
--事件触发拍脸 (如五星成长礼) --事件触发拍脸 (如五星成长礼)
function this.OnAddPatFaceData(faceConFigType, starUpGiftNum) function this.OnAddPatFaceData(faceConFigType, starUpGiftNum)
if this.isLogin then return end--上来就弹新关卡界面 所以不弹 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 = {} patFaceAllData = {}
local allTypeFaceConFig = ConfigManager.GetAllConfigsDataByKey(ConfigName.LoginPosterConfig,"Type",faceConFigType) local allTypeFaceConFig = ConfigManager.GetAllConfigsDataByKey(ConfigName.LoginPosterConfig,"Type",faceConFigType)
-- LogPink("faceConFigType 1--------- "..#allTypeFaceConFig.." "..tostring(starUpGiftNum)) -- LogPink("faceConFigType 1--------- "..#allTypeFaceConFig.." "..tostring(starUpGiftNum))

View File

@ -37,7 +37,7 @@ end
-- 扫荡按钮 -- 扫荡按钮
--- btn1点击回调事件 --- btn1点击回调事件
function this.On_Btn1_Click() 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 if this.root.order>=1 then
--保存编队 --保存编队
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList, FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,

View File

@ -165,8 +165,8 @@ end
-- 刷新地图中的队伍数据 -- 刷新地图中的队伍数据
function this.RefershMapTeam() function this.RefershMapTeam()
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.Mapping then
--MapManager.formationList = this.RefreshTeamInfo() MapManager.formationList = this.RefreshTeamInfo()
end end
end end
@ -388,27 +388,14 @@ end
--判断当前的行动力是已经是上限 --判断当前的行动力是已经是上限
function this.EnergyEnough() function this.EnergyEnough()
-- 地图里用显示的数据,地图外面用背包的数据 -- 地图里用显示的数据,地图外面用背包的数据
local curEnergy = 0 local curEnergy = BagManager.GetItemCountById(1)
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then
curEnergy = this.leftEnergy
else
curEnergy = BagManager.GetItemCountById(1)
end
local limitValue = this.GetTotalEnergy() local limitValue = this.GetTotalEnergy()
return curEnergy >= limitValue return curEnergy >= limitValue
end end
-- 返回剩余行动力 -- 返回剩余行动力
function this.GetLeftMapEnergy() function this.GetLeftMapEnergy()
local curEnergy = 0 return BagManager.GetItemCountById(1)
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS and MapManager.isInMap then
curEnergy = this.leftEnergy
else
curEnergy = BagManager.GetItemCountById(1)
end
return curEnergy
end end
-- ================================================================================= -- =================================================================================

View File

@ -64,7 +64,7 @@ end
-- --
function NotEnoughPopup:Show(itemId, func) 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 if itemId == 15 and not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP)then
PopupTipPanel.ShowTip(Language[10847]) PopupTipPanel.ShowTip(Language[10847])
return return

View File

@ -102,7 +102,7 @@ function this.PlayerInfoRequest(func)
PlayerManager.gem = msg.player.gem PlayerManager.gem = msg.player.gem
PlayerManager.chargeGem = msg.player.chargeGem PlayerManager.chargeGem = msg.player.chargeGem
PlayerManager.curMapId = msg.player.curMapId 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 PlayerManager.maxForce = msg.player.maxForce
-- RecruitManager.randCount = msg.randCount % 100 --钻石抽卡已招募次数 用不上了 协议没删 -- RecruitManager.randCount = msg.randCount % 100 --钻石抽卡已招募次数 用不上了 协议没删
RecruitManager.isTenRecruit = msg.firstTenth --首次十连 RecruitManager.isTenRecruit = msg.firstTenth --首次十连
@ -364,49 +364,48 @@ function this.MapInfoRequest(mapModeId,func)
func(msg) func(msg)
end end
-- 请求进图后 -- 请求进图后
MapManager.isInMap = true
MapManager.Mapping = true MapManager.Mapping = true
end) end)
end end
--请求地图离开 -- --请求地图离开
function this.MapOutRequest(outType, func, nextMapId) -- function this.MapOutRequest(outType, func, nextMapId)
local data = MapInfoProto_pb.MapOutRequest() -- local data = MapInfoProto_pb.MapOutRequest()
data.curXY = MapManager.curPos -- data.curXY = MapManager.curPos
data.mapId = MapManager.curMapId -- data.mapId = MapManager.curMapId
data.outType = outType -- data.outType = outType
-- 无尽副本使用 -- -- 无尽副本使用
local distMapId = 0 -- local distMapId = 0
if not nextMapId or nextMapId == 0 then -- if not nextMapId or nextMapId == 0 then
distMapId = 0 -- distMapId = 0
else -- else
distMapId = nextMapId -- distMapId = nextMapId
end -- end
data.targetMapId = distMapId -- data.targetMapId = distMapId
Log("data.targetMapId == " .. data.targetMapId) -- Log("data.targetMapId == " .. data.targetMapId)
Log("MapOutRequest MapManager.curMapId " .. MapManager.curMapId) -- Log("MapOutRequest MapManager.curMapId " .. MapManager.curMapId)
for i = 1, #MapManager.stepList do -- for i = 1, #MapManager.stepList do
--将当前探索步骤传给后端同步校验 -- --将当前探索步骤传给后端同步校验
data.cells:append(MapManager.stepList[i]) -- data.cells:append(MapManager.stepList[i])
end -- end
local msg = data:SerializeToString() -- local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.MAP_OUT_REQUEST, MessageTypeProto_pb.MAP_OUT_RESPONSE, msg, function(buffer) -- Network:SendMessageWithCallBack(MessageTypeProto_pb.MAP_OUT_REQUEST, MessageTypeProto_pb.MAP_OUT_RESPONSE, msg, function(buffer)
local data = buffer:DataByte() -- local data = buffer:DataByte()
local msg = MapInfoProto_pb.MapOutResponse() -- local msg = MapInfoProto_pb.MapOutResponse()
msg:ParseFromString(data) -- msg:ParseFromString(data)
if func then -- if func then
func(msg) -- func(msg)
end -- end
MapManager.stepList = {} --收到回调后,清空当前探索步骤 -- MapManager.stepList = {} --收到回调后,清空当前探索步骤
MapManager.pointAtkPower = {} -- MapManager.pointAtkPower = {}
PlayerManager.curMapId = 0 -- PlayerManager.curMapId = 0
MapManager.curMapId = 0 -- MapManager.curMapId = 0
MapManager.isInMap = false -- MapManager.Mapping = false
MapTrialManager.SetBossState(0) -- MapTrialManager.SetBossState(0)
end) -- end)
end -- end
-- -- 请求开始探索副本地图 -- -- 请求开始探索副本地图
-- function this.CarbonMissionStartRequest(func) -- function this.CarbonMissionStartRequest(func)

View File

@ -133,7 +133,7 @@ function this.RefreshItemNumById(itemId)
if isAddItem[itemId] then if isAddItem[itemId] then
isAddItem[itemId] = false 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 if #MapManager.stepList > 0 then
MapManager.MapUpdateEvent(-1000, function () MapManager.MapUpdateEvent(-1000, function ()
NetManager.RefreshEnergyRequest({itemId},function() NetManager.RefreshEnergyRequest({itemId},function()

View File

@ -85,7 +85,7 @@ end
function this:LoseJump(id) function this:LoseJump(id)
if not MapManager.isInMap then if not MapManager.Mapping then
if JumpManager.CheckJump(id) then if JumpManager.CheckJump(id) then
if m_battlePanel then if m_battlePanel then
m_battlePanel:ClosePanel() m_battlePanel:ClosePanel()

View File

@ -41,7 +41,7 @@ function JumpView:OnOpen(jumpId,isRewardItemPop)
self:GoToJumpData() self:GoToJumpData()
end) end)
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) self.btnSure:SetActive(false)
else else
self.btnSure:SetActive(true) self.btnSure:SetActive(true)

View File

@ -54,10 +54,6 @@ local _ShowPlusType = {
-- 判断是否显示加号 -- 判断是否显示加号
local function _IsShowPlus(_type) local function _IsShowPlus(_type)
-- 魂晶特殊处理,在地图中不显示 + 号
if _type == UpViewRechargeType.SoulCrystal and MapManager.isInMap then
return false
end
-- 判断是否是可购买的类型 -- 判断是否是可购买的类型
for _, type in ipairs(_ShowPlusType) do for _, type in ipairs(_ShowPlusType) do
if type == _type then if type == _type then
@ -313,7 +309,7 @@ function UpView:RechargeType(_type)
UIManager.OpenPanel(UIName.ElementDrawCardPanel) UIManager.OpenPanel(UIName.ElementDrawCardPanel)
elseif _type == UpViewRechargeType.DemonCrystal then 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 if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
PopupTipPanel.ShowTip(Language[10438]) PopupTipPanel.ShowTip(Language[10438])
return return
@ -324,7 +320,7 @@ function UpView:RechargeType(_type)
-- end -- end
elseif _type == UpViewRechargeType.SoulCrystal then 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 if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then
PopupTipPanel.ShowTip(Language[10438]) PopupTipPanel.ShowTip(Language[10438])
return return