Browse Source

- Fixed Sky Deleter Card (and similar items) not healing when killing a monster when in Berserk status

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15106 54d463be-8e91-2dee-dedb-b68131a5f0ec
epoque11 13 years ago
parent
commit
809d7dd143
2 changed files with 9 additions and 3 deletions
  1. 3 1
      src/map/skill.c
  2. 6 2
      src/map/status.c

+ 3 - 1
src/map/skill.c

@@ -1473,7 +1473,9 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
 			hp += sd->magic_hp_gain_value;
 		}
 		if( hp || sp )
-			status_heal(src, hp, sp, battle_config.show_hp_sp_gain?2:0);
+		{// updated to force healing to allow healing through berserk
+			status_heal(src, hp, sp, battle_config.show_hp_sp_gain ? 3 : 1);
+		}
 	}
 
 	// Trigger counter-spells to retaliate against damage causing skills.

+ 6 - 2
src/map/status.c

@@ -1128,8 +1128,12 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag)
 	}
 
 	if(hp) {
-		if (!(flag&1) && sc && sc->data[SC_BERSERK])
-			hp = 0;
+		if( sc && sc->data[SC_BERSERK] ) {
+			if( flag&1 )
+				flag &= ~2;
+			else
+				hp = 0;
+		}
 
 		if((unsigned int)hp > status->max_hp - status->hp)
 			hp = status->max_hp - status->hp;