只有主线关卡战斗结算显示金猪

This commit is contained in:
chenxi 2023-06-02 12:11:29 +08:00
parent 09fb4c1fb7
commit b609f796ba
4 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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)

View File

@ -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