From 90bd77a4b7c4e2aa7b86d32cba8e8d51d74d4648 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 13 Jun 2023 10:36:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller_dungeon_gold.lua | 7 ++++--- lua/app/ui/battle/battle_result_ui.lua | 5 +---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua b/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua index 549fd367..3b1746da 100644 --- a/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua +++ b/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua @@ -28,7 +28,7 @@ function BattleControllerDungeonGold:enterRoundBegin(...) end end if self.battleUI then - self.battleUI:refreshWave(nextWaveRound, GConst.ATLAS_PATH.COMMON, "common_dec_15") + self.battleUI:refreshWave(self.dungeonGoldMaxRoundCount - nextWaveRound + 1, GConst.ATLAS_PATH.COMMON, "common_dec_15") end BattleController.enterRoundBegin(self, ...) end @@ -38,16 +38,17 @@ function BattleControllerDungeonGold:initOther() self.dungeonGoldMaxRoundCount = self:getChapterConfig()[self.chapterId].wave_limit or 1 if self.battleUI then - self.battleUI:refreshWave(1, GConst.ATLAS_PATH.COMMON, "common_dec_15") + self.battleUI:refreshWave(self.dungeonGoldMaxRoundCount, GConst.ATLAS_PATH.COMMON, "common_dec_15") end end function BattleControllerDungeonGold:controllBattleEnd() + local remainRound = self.dungeonGoldMaxRoundCount - (self.waveRoundCount[1] or 0) self.combatReport = { battleType = GConst.BattleConst.BATTLE_TYPE.DUNGEON_GOLD, wave = self.waveIndex, victory = self.victory, - waveRoundCount = self.waveRoundCount, + remainRound = remainRound, } local atkReport = {} local teamEntity = DataManager.BattleData:getAtkTeam() diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index 562552f8..5e20ad50 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -99,10 +99,7 @@ function BattleResultUI:refreshFixedInfo() local iconName = "common_dec_3" if self.battleType == GConst.BattleConst.BATTLE_TYPE.DUNGEON_GOLD then iconName = "common_dec_15" - local round = 0 - if self.combatReport.waveRoundCount then - round = self.combatReport.waveRoundCount[1] or 0 - end + local round = self.combatReport.remainRound or 0 desc2:setText(round) end icon:setSprite(GConst.ATLAS_PATH.COMMON, iconName)