Resolved Small and Large Life Potion Healing (#3712)

* Fixes #3705.
* Heal rate was comparing battle status versus base status.
Thanks to @Everade!
This commit is contained in:
Aleos 2018-11-27 22:26:16 -05:00 committed by GitHub
parent 505a0cd888
commit 47d76205c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13050,11 +13050,11 @@ TIMER_FUNC(status_change_timer){
case SC_S_LIFEPOTION:
case SC_L_LIFEPOTION:
if( sd && --(sce->val4) >= 0 ) {
if( --(sce->val4) >= 0 ) {
// val1 < 0 = per max% | val1 > 0 = exact amount
int hp = 0;
if( status->hp < status->max_hp )
hp = (sce->val1 < 0) ? (int)(sd->status.max_hp * -1 * sce->val1 / 100.) : sce->val1 ;
hp = (sce->val1 < 0) ? (int)(status->max_hp * -1 * sce->val1 / 100.) : sce->val1;
status_heal(bl, hp, 0, 2);
sc_timer_next((sce->val2 * 1000) + tick);
return 0;