bug修复

This commit is contained in:
xiekaidong 2023-08-10 17:33:30 +08:00
parent aca97b775e
commit 1a5f74708e
2 changed files with 12 additions and 4 deletions

View File

@ -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]
if rewards then
ModuleManager.BattleManager:showBoxOpenUI(rewards, function()
self:onFillBoardOver()
end)
else
self:onFillBoardOver()
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

View File

@ -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) -- 神秘宝箱索引