Commit 6d238bc6ba55eacafb46673773b995027d259c83

Authored by suhongyang
1 parent 6cd12079

Fix bug

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
src/adv/AdvBuff.lua
@@ -87,9 +87,9 @@ local BuffFactory = { @@ -87,9 +87,9 @@ local BuffFactory = {
87 self.owner.hpMax = math.max(1, self.owner.hpMax + self._changeV) 87 self.owner.hpMax = math.max(1, self.owner.hpMax + self._changeV)
88 self._changeV = self.owner.hpMax - old 88 self._changeV = self.owner.hpMax - old
89 if self._changeV > 0 then 89 if self._changeV > 0 then
90 - self.owner:recover(self._changeV, self.release or self.owner) -- 防止release不存在,地图点buff 90 + self.owner:recover(self._changeV, self.release) -- 防止release不存在,地图点buff
91 elseif self._changeV < 0 then 91 elseif self._changeV < 0 then
92 - self.owner:hurt(self.release:getHurtValue(-self._changeV), self.release or self.owner, {hurtType = 2}) 92 + self.owner:hurt(self.release:getHurtValue(-self._changeV), self.release, {hurtType = 2})
93 self.owner.hp = math.min(self.owner.hpMax, self.owner.hp) 93 self.owner.hp = math.min(self.owner.hpMax, self.owner.hp)
94 end 94 end
95 end 95 end
@@ -270,7 +270,7 @@ function Buff.load(owner, data) @@ -270,7 +270,7 @@ function Buff.load(owner, data)
270 end 270 end
271 271
272 function Buff:initNew(release, data) 272 function Buff:initNew(release, data)
273 - self.release = release 273 + self.release = release or self.owner
274 self.round = self.buffData.round 274 self.round = self.buffData.round
275 self.turn = self.buffData.turn 275 self.turn = self.buffData.turn
276 if self.buffData.effectTime > 0 then 276 if self.buffData.effectTime > 0 then