diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index ee39b0c5..23391c9a 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -925,7 +925,7 @@ function BattleBaseController:enterNextWaveBySnapshot(snapShot) self.curWaveMonsterDead = false self:refreshWave(self.waveIndex) self.needWaitingBoardOver = true - self:generateBoard(true, snapShot.boardSnapInfo) + self:generateBoard(true, snapShot) self.waveDurationTime = 0 self.eliminateCount = 0 @@ -1537,9 +1537,13 @@ function BattleBaseController:onFillBoardOver(isRoundBeginCheck) local index = table.remove(self.showMysteryBoxIndexs, 1) local boardList, _, mysteryBoxIndexMap = self:getInitBoard() local rewards = mysteryBoxIndexMap[index] - ModuleManager.BattleManager:showBoxOpenUI(rewards, function() + if rewards then + ModuleManager.BattleManager:showBoxOpenUI(rewards, function() + self:onFillBoardOver() + end) + else self:onFillBoardOver() - end) + end return end @@ -1620,6 +1624,9 @@ function BattleBaseController:generateBoard(isFirst, snapshot) end self.curBoardIndex = (self.curBoardIndex or 0) + 1 + if snapshot and snapshot.curBoardIndex then + self.curBoardIndex = snapshot.curBoardIndex + end if not boardList[self.curBoardIndex] then -- 容错 if isFirst then self.needWaitingBoardOver = false @@ -1632,7 +1639,7 @@ function BattleBaseController:generateBoard(isFirst, snapshot) board = mysteryBoard end self.battleUI:switchBoard(function() - self.battleData:refreshBoard(board, self:getBlockIcon(), snapshot) + self.battleData:refreshBoard(board, self:getBlockIcon(), snapshot and snapshot.boardSnapInfo) self.battleUI:initGridCell(function() if isFirst then self.needWaitingBoardOver = false diff --git a/lua/app/module/battle/helper/battle_snapshot_helper.lua b/lua/app/module/battle/helper/battle_snapshot_helper.lua index 72c5d81a..94cc9fb5 100644 --- a/lua/app/module/battle/helper/battle_snapshot_helper.lua +++ b/lua/app/module/battle/helper/battle_snapshot_helper.lua @@ -50,6 +50,7 @@ function BattleSnapshotHelper:snapshotBattleInfo(battleBaseController) for k, v in pairs(battleBaseController.lastRoundBreakedGridType) do battleBaseController.snapShotInfo.lastRoundBreakedGridType[tostring(k)] = v end + battleBaseController.snapShotInfo.curBoardIndex = battleBaseController.curBoardIndex battleBaseController.snapShotInfo.chapterId = battleBaseController.chapterId -- 当前战斗关卡 battleBaseController.snapShotInfo.waveIndex = battleBaseController.waveIndex -- 当前波次 battleBaseController.snapShotInfo.gotMysteryBoxIndexs = table.clearOrCreate(battleBaseController.snapShotInfo.gotMysteryBoxIndexs) -- 神秘宝箱索引