Explorar o código

Resolved Small and Large Life Potion Healing (#3712)

* Fixes #3705.
* Heal rate was comparing battle status versus base status.
Thanks to @Everade!
Aleos %!s(int64=6) %!d(string=hai) anos
pai
achega
47d76205c0
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/map/status.cpp

+ 2 - 2
src/map/status.cpp

@@ -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;