Commit e601f3cb44fc2f04804642a9e31e29fe42910a1a
1 parent
b594a026
fixbug
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/adv/AdvBuff.lua
@@ -86,9 +86,9 @@ local BuffFactory = { | @@ -86,9 +86,9 @@ local BuffFactory = { | ||
86 | self.owner.hpMax = math.max(1, self.owner.hpMax + self._changeV) | 86 | self.owner.hpMax = math.max(1, self.owner.hpMax + self._changeV) |
87 | self._changeV = self.owner.hpMax - old | 87 | self._changeV = self.owner.hpMax - old |
88 | if self._changeV > 0 then | 88 | if self._changeV > 0 then |
89 | - self.owner:recover(self._changeV, self.release) | 89 | + self.owner:recover(self._changeV, self.release or self.owner) -- 防止release不存在,地图点buff |
90 | elseif self._changeV < 0 then | 90 | elseif self._changeV < 0 then |
91 | - self.owner:hurt(self.release:getHurtValue(-self._changeV), self.release, {hurtType = 2}) | 91 | + self.owner:hurt(self.release:getHurtValue(-self._changeV), self.release or self.owner, {hurtType = 2}) |
92 | self.owner.hp = math.min(self.owner.hpMax, self.owner.hp) | 92 | self.owner.hp = math.min(self.owner.hpMax, self.owner.hp) |
93 | end | 93 | end |
94 | end | 94 | end |