buff修改
This commit is contained in:
parent
5d92a06f2f
commit
b00c0eb831
@ -115,15 +115,13 @@ function BattleSkillEntity:addSkillEffectParams(effect)
|
|||||||
for _, entity in ipairs(self.effectList) do
|
for _, entity in ipairs(self.effectList) do
|
||||||
if entity:getName() == effect.type then
|
if entity:getName() == effect.type then
|
||||||
buffEntity = entity
|
buffEntity = entity
|
||||||
break
|
buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
buffEntity:init(effect, self.owner, self)
|
buffEntity:init(effect, self.owner, self)
|
||||||
table.insert(self.effectList, buffEntity)
|
table.insert(self.effectList, buffEntity)
|
||||||
else
|
|
||||||
buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -132,15 +130,13 @@ function BattleSkillEntity:addSkillEffectRound(effect)
|
|||||||
for _, entity in ipairs(self.effectList) do
|
for _, entity in ipairs(self.effectList) do
|
||||||
if entity:getName() == effect.type then
|
if entity:getName() == effect.type then
|
||||||
buffEntity = entity
|
buffEntity = entity
|
||||||
break
|
buffEntity:setRound(buffEntity:getRound() + effect.round)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
buffEntity:init(effect, self.owner, self)
|
buffEntity:init(effect, self.owner, self)
|
||||||
table.insert(self.effectList, buffEntity)
|
table.insert(self.effectList, buffEntity)
|
||||||
else
|
|
||||||
buffEntity:setRound(buffEntity:getRound() + effect.round)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user