护盾buff

This commit is contained in:
chenxi 2023-04-25 10:42:16 +08:00
parent 5c4d0bf6b7
commit 89cdcef44f

View File

@ -269,13 +269,13 @@ function BattleTeam:updateBuffState(buff, num)
if fxList then
local fxCfg = BattleHelper:getFxConfig()
for k, v in ipairs(fxList) do
for k2, v2 in ipairs(self.unitList) do
local fxInfo = fxCfg[v]
if fxInfo then
local res = fxInfo.res
local count = self.loopFxMap[res] or 0
self.loopFxMap[res] = count - 1
if count == 1 then
local fxInfo = fxCfg[v]
if fxInfo then
local res = fxInfo.res
local count = self.loopFxMap[res] or 0
self.loopFxMap[res] = count - 1
if count == 1 then
for k2, v2 in ipairs(self.unitList) do
v2:removeEffect(res)
end
end
@ -287,13 +287,13 @@ function BattleTeam:updateBuffState(buff, num)
if fxList then
local fxCfg = BattleHelper:getFxConfig()
for k, v in ipairs(fxList) do
for k2, v2 in ipairs(self.unitList) do
local fxInfo = fxCfg[v]
if fxInfo then
local res = fxInfo.res
local count = self.loopFxMap[res] or 0
self.loopFxMap[res] = count + 1
if count == 0 then
local fxInfo = fxCfg[v]
if fxInfo then
local res = fxInfo.res
local count = self.loopFxMap[res] or 0
self.loopFxMap[res] = count + 1
if count == 0 then
for k2, v2 in ipairs(self.unitList) do
v2:getEffectAndPlay(fxInfo, true)
end
end