锁定buff修复

This commit is contained in:
xiekaidong 2023-10-27 16:00:43 +08:00
parent 5142f704c5
commit a29a9606bf
2 changed files with 5 additions and 2 deletions

View File

@ -1995,9 +1995,8 @@ function BattleBaseController:lockElement(lcokElementType, isUnlock)
end end
if isUnlock then if isUnlock then
self.battleData:cacheLockElement(lcokElementType, nil) self.battleData:clearAllCacheLockElement(lcokElementType, nil)
for elementType, list in pairs(self.lockElementMap) do for elementType, list in pairs(self.lockElementMap) do
self.battleData:cacheLockElement(elementType, nil)
for _, posId in ipairs(list) do for _, posId in ipairs(list) do
self.battleData:setGridType(posId, BattleConst.GRID_TYPE.EMPTY) self.battleData:setGridType(posId, BattleConst.GRID_TYPE.EMPTY)
end end

View File

@ -617,6 +617,10 @@ function BattleBaseData:getCacheLockedElement(elementType)
return self.lockElementMap[elementType] return self.lockElementMap[elementType]
end end
function BattleBaseData:clearAllCacheLockElement()
self.lockElementMap = table.clearOrCreate(self.lockElementMap)
end
function BattleBaseData:cacheBoardSkill() function BattleBaseData:cacheBoardSkill()
self.cacheSkillList = {} self.cacheSkillList = {}
self.cacheSkillCount = 0 self.cacheSkillCount = 0