bug修复

This commit is contained in:
xiekaidong 2023-04-19 18:02:32 +08:00
parent 06d96cefd4
commit a43068daf4
2 changed files with 10 additions and 1 deletions

View File

@ -558,7 +558,7 @@ function BattleController:onTouchEvent(eventType, posId)
return
end
local snapshot = self.battleData:removeGridSequence(sequence[1].posId)
local snapshot = self.battleData:getFirstSequenceSnapshot()
if snapshot then -- 如果有快照,则恢复一次
for posId, info in pairs(snapshot) do
local entity = self.battleData:getGridEntity(posId)

View File

@ -213,6 +213,15 @@ function BattleData:removeGridSequence(posId)
return snapshot
end
function BattleData:getFirstSequenceSnapshot(posId)
if not self.gridSequence[1] then
return
end
local snapshot = self.gridSequence[1].snapshot
return snapshot
end
function BattleData:cacheSkillInfluenceGrids(grids)
if not self.skillInfluenceGrids then
self.skillInfluenceGrids = {}