Merge pull request #305 from rathena/hotfix/issue301
Fixes #301 - Fixed status_percent_heal() not healing based on Max HP/SP.
This commit is contained in:
commit
5ce17c80a7
@ -1666,7 +1666,7 @@ int status_percent_change(struct block_list *src, struct block_list *target, int
|
|||||||
else if (hp_rate < -99)
|
else if (hp_rate < -99)
|
||||||
hp = status->max_hp;
|
hp = status->max_hp;
|
||||||
else if (hp_rate < 0)
|
else if (hp_rate < 0)
|
||||||
hp = (apply_rate(status->hp, -hp_rate));
|
hp = (apply_rate(status->max_hp, -hp_rate));
|
||||||
if (hp_rate && !hp)
|
if (hp_rate && !hp)
|
||||||
hp = 1;
|
hp = 1;
|
||||||
|
|
||||||
@ -1680,7 +1680,7 @@ int status_percent_change(struct block_list *src, struct block_list *target, int
|
|||||||
else if (sp_rate < -99)
|
else if (sp_rate < -99)
|
||||||
sp = status->max_sp;
|
sp = status->max_sp;
|
||||||
else if (sp_rate < 0)
|
else if (sp_rate < 0)
|
||||||
sp = (apply_rate(status->sp, -sp_rate));
|
sp = (apply_rate(status->max_sp, -sp_rate));
|
||||||
if (sp_rate && !sp)
|
if (sp_rate && !sp)
|
||||||
sp = 1;
|
sp = 1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user