续关记录能量
This commit is contained in:
parent
c21607c52e
commit
a94b0b1a23
@ -74,6 +74,11 @@ function BattleSnapshotHelper:snapshotBattleInfo(battleBaseController)
|
||||
battleBaseController.snapShotInfo.atkSkillMap[tostring(skillId)] = info
|
||||
end
|
||||
|
||||
battleBaseController.snapShotInfo.atkSkillEnergy = table.clearOrCreate(battleBaseController.snapShotInfo.atkSkillEnergy)
|
||||
for elementType, skillEntity in pairs(battleBaseController.battleData:getSkillEntities(SIDE_ATK)) do
|
||||
battleBaseController.snapShotInfo.atkSkillEnergy[tostring(elementType)] = skillEntity:getEnergy()
|
||||
end
|
||||
|
||||
-- BattleBaseData
|
||||
battleBaseController.snapShotInfo.battledataShopInfo = battleBaseController.battleData:getSnapshoptInfo()
|
||||
|
||||
@ -213,12 +218,23 @@ function BattleSnapshotHelper:dealSnapshotBattleExtraInfo(battleBaseController,
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if battleBaseController.battleUI then
|
||||
battleBaseController.battleUI:refreshSkill(nil, nil, SIDE_ATK)
|
||||
local atkSkillEnergy = snapshot.atkSkillEnergy
|
||||
if atkSkillEnergy then
|
||||
local skillMap = battleBaseController.battleData:getSkillEntities(SIDE_ATK)
|
||||
for matchTypeStr, count in pairs(atkSkillEnergy) do
|
||||
local matchType = tonumber(matchTypeStr)
|
||||
if matchType and skillMap[matchType] then
|
||||
skillMap[matchType]:addEnergy(count)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if battleBaseController.battleUI then
|
||||
battleBaseController.battleUI:refreshSkill(nil, nil, SIDE_ATK)
|
||||
end
|
||||
|
||||
-- buff
|
||||
local atkBuff = snapshot.atkBuff
|
||||
if atkBuff then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user