buff修改

This commit is contained in:
xiekaidong 2023-05-29 11:26:25 +08:00
parent 5d92a06f2f
commit b00c0eb831

View File

@ -115,15 +115,13 @@ function BattleSkillEntity:addSkillEffectParams(effect)
for _, entity in ipairs(self.effectList) do
if entity:getName() == effect.type then
buffEntity = entity
break
buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num)
end
end
if not buffEntity then
buffEntity = BattleBuffEntity:create()
buffEntity:init(effect, self.owner, self)
table.insert(self.effectList, buffEntity)
else
buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num)
end
end
@ -132,15 +130,13 @@ function BattleSkillEntity:addSkillEffectRound(effect)
for _, entity in ipairs(self.effectList) do
if entity:getName() == effect.type then
buffEntity = entity
break
buffEntity:setRound(buffEntity:getRound() + effect.round)
end
end
if not buffEntity then
buffEntity = BattleBuffEntity:create()
buffEntity:init(effect, self.owner, self)
table.insert(self.effectList, buffEntity)
else
buffEntity:setRound(buffEntity:getRound() + effect.round)
end
end