diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 2eebf69afa..53d22981a4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -459,13 +459,16 @@ function this.ShowBattleResult(result, msg) -- 胜利显示本场比赛的表现最好的英雄 UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 - UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function() - --车迟挑战cd计时 - GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Challenge) - if _BattleBestPopup then - _BattleBestPopup:ClosePanel() + UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle) + LogPink("isBackBattle "..tostring(isBackBattle)) + if not isBackBattle then + --车迟挑战cd计时 + GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Challenge) + if _BattleBestPopup then + _BattleBestPopup:ClosePanel() + end + this:ClosePanel() end - this:ClosePanel() end, 3,true,true) end) end @@ -479,11 +482,14 @@ function this.ShowBattleResult(result, msg) -- 胜利显示本场比赛的表现最好的英雄 UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 - UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function() - if _BattleBestPopup then - _BattleBestPopup:ClosePanel() + UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function(isBackBattle) + LogPink("isBackBattle "..tostring(isBackBattle)) + if not isBackBattle then + if _BattleBestPopup then + _BattleBestPopup:ClosePanel() + end + this:ClosePanel() end - this:ClosePanel() end, 4,true,true) end) end @@ -558,6 +564,49 @@ function this.ShowBattleResult(result, msg) end) end end, 0.1):Start() + elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY and GuildCarDelayManager.progress == 1 then + -- 延时执行避免事件冲突 + Timer.New(function() + local bestData, allDamage= BattleRecordManager.GetBattleBestData() + if bestData then + -- 胜利显示本场比赛的表现最好的英雄 + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) + -- 打开关卡奖励界面 + UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle) + LogPink("isBackBattle "..tostring(isBackBattle)) + if not isBackBattle then + --车迟挑战cd计时 + GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Challenge) + if _BattleBestPopup then + _BattleBestPopup:ClosePanel() + end + this:ClosePanel() + end + end, 3,true,true) + end) + end + end, 0.1):Start() + -- 十绝阵结算界面特殊显示 + elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.DEATH_POS then + -- 延时执行避免事件冲突 + Timer.New(function() + local bestData, allDamage= BattleRecordManager.GetBattleBestData() + if bestData then + -- 胜利显示本场比赛的表现最好的英雄 + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) + -- 打开关卡奖励界面 + UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function(isBackBattle) + LogPink("isBackBattle "..tostring(isBackBattle)) + if not isBackBattle then + if _BattleBestPopup then + _BattleBestPopup:ClosePanel() + end + this:ClosePanel() + end + end, 4,true,true) + end) + end + end, 0.1):Start() else if result == 0 then -- 失败 local haveRecord = BattleRecordManager.isHaveRecord() diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua index 4bd6e7a114..c1f8194dc4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua @@ -185,16 +185,19 @@ function BattleWinPopup:NextStep() -- 胜利显示本场比赛的表现最好的英雄 UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) -- 打开关卡奖励界面 - UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function() - --车迟抢夺cd计时 - GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot) - if _BattleBestPopup then - _BattleBestPopup:ClosePanel() + UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle) + LogPink("isBackBattle "..tostring(isBackBattle)) + if not isBackBattle then + --车迟抢夺cd计时 + GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot) + if _BattleBestPopup then + _BattleBestPopup:ClosePanel() + end + if m_battlePanel then + m_battlePanel:ClosePanel() + end + self:ClosePanel() end - if m_battlePanel then - m_battlePanel:ClosePanel() - end - self:ClosePanel() end, 3,true,true) end) end @@ -302,6 +305,28 @@ function BattleWinPopup:NextStep() end end,func2) end + elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟 + local bestData, allDamage= BattleRecordManager.GetBattleBestData() + if bestData then + -- 胜利显示本场比赛的表现最好的英雄 + UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup) + -- 打开关卡奖励界面 + UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle) + LogPink("isBackBattle "..tostring(isBackBattle)) + if not isBackBattle then + --车迟抢夺cd计时 + GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot) + if _BattleBestPopup then + _BattleBestPopup:ClosePanel() + end + if m_battlePanel then + m_battlePanel:ClosePanel() + end + self:ClosePanel() + end + end, 3,true,true) + end) + end end end end