Commit 4500c9b8b32d2f21f21544a335bdfa864014e6c2

Authored by zhouhaihai
1 parent 286da0d5

满了不飘字

Showing 2 changed files with 7 additions and 3 deletions   Show diff stats
publish/publish.sh
... ... @@ -28,7 +28,7 @@ cd -
28 28 rsync -aP --exclude=".git" ./src/ ${dist}/src/
29 29 rsync -aP ./publish/skynet ${dist}/
30 30 rsync -aP --exclude={config/develop.lua,config/nodenames.lua} config ${dist}/
31   -cp kill.sh ${dist}/
32   -cp run.sh ${dist}/
  31 +# cp kill.sh ${dist}/
  32 +# cp run.sh ${dist}/
33 33  
34 34 # rsync -aP --exclude-from="./publish/exclude.list" ${origin}/ ./${dist}/
... ...
src/adv/AdvPlayer.lua
... ... @@ -416,9 +416,13 @@ end
416 416 function BaseObject:recover(value, releaser, params)
417 417 params = params or {}
418 418 value = math.max(0, math.ceil(value))
  419 + local old = self.hp
419 420 self.hp = math.min(self.hpMax, self.hp + value)
  421 + local change = self.hp - old
420 422 if self:is("Player") then
421   - self.battle.adv:pushBackEvent(AdvBackEventType.HpChange, {change = value})
  423 + if change > 0 then
  424 + self.battle.adv:pushBackEvent(AdvBackEventType.HpChange, {change = value})
  425 + end
422 426 end
423 427 end
424 428  
... ...