diff --git a/lua/app/module/battle/battle_manager.lua b/lua/app/module/battle/battle_manager.lua index b593a36f..080c39c3 100644 --- a/lua/app/module/battle/battle_manager.lua +++ b/lua/app/module/battle/battle_manager.lua @@ -15,8 +15,8 @@ function BattleManager:showPauseUI(battleType) UIManager:showUI("app/ui/battle/battle_pause_ui", {battleType = battleType}) end -function BattleManager:showBattleResultUI(rewards, combatReport, mysteryBoxIdx) - UIManager:showUI("app/ui/battle/battle_result_ui", {rewards = rewards, combatReport = combatReport, mysteryBoxIdx = mysteryBoxIdx}) +function BattleManager:showBattleResultUI(battleType, rewards, combatReport, mysteryBoxIdx) + UIManager:showUI("app/ui/battle/battle_result_ui", {battleType = battleType, rewards = rewards, combatReport = combatReport, mysteryBoxIdx = mysteryBoxIdx}) end function BattleManager:showBoxOpenUI(rewards, callback) diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index c15afee3..ecdbbae9 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -100,7 +100,7 @@ function ChapterManager:endFightFinish(result) end end - ModuleManager.BattleManager:showBattleResultUI(newRewards, reqData.combatReport, mysteryBoxIdx) + ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx) DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx) -- 处理金猪,要在章节更新之后 DataManager.GoldPigData:addGoldPigCount() diff --git a/lua/app/module/daily_challenge/daily_challenge_manager.lua b/lua/app/module/daily_challenge/daily_challenge_manager.lua index 69572a34..8507c751 100644 --- a/lua/app/module/daily_challenge/daily_challenge_manager.lua +++ b/lua/app/module/daily_challenge/daily_challenge_manager.lua @@ -99,7 +99,7 @@ function DailyChallengeManager:endChallengeFinish(result) if result.err_code == GConst.ERROR_STR.SUCCESS then local reqData = result.reqData local rewards = result.rewards - ModuleManager.BattleManager:showBattleResultUI(rewards, reqData.combatReport) + ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, rewards, reqData.combatReport) DataManager.DailyChallengeData:init(result.daily_challenge) ModuleManager.TaskManager:addFightTaskProgress(reqData) diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index 1c0260b6..75dccdb2 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -10,6 +10,7 @@ function BattleResultUI:ctor(params) self.rewards = params.rewards self.combatReport = params.combatReport self.mysteryBoxIdx = params.mysteryBoxIdx or 0 + self.battleType = params.battleType self.isTryShowGoldPig = false self.totalDmg = 0 if self.combatReport.atkReport then @@ -182,6 +183,9 @@ end function BattleResultUI:tryShowGoldPig() self.isTryShowGoldPig = true + if self.battleType ~= GConst.BattleConst.BATTLE_TYPE.STAGE then + return false + end if not DataManager.GoldPigData:getIsOpen() then return false end