Browse Source

Corrected some skills healing immune targets (fixes #1109)
* Gentle Touch - Cure and Tuna Belly will no longer heal Emperium or Barricades.
Thanks to @admkakaroto and @Darkelfen!

aleos89 9 years ago
parent
commit
63e772956b
1 changed files with 8 additions and 4 deletions
  1. 8 4
      src/map/skill.c

+ 8 - 4
src/map/skill.c

@@ -9798,9 +9798,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 
 	case SR_GENTLETOUCH_CURE:
 		{
-			int heal;
+			unsigned int heal;
 
-			if (!dstmd || dstmd->mob_id != MOBID_EMPERIUM || !mob_is_battleground(dstmd)) {
+			if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd)))
+				heal = 0;
+			else {
 				heal = (120 * skill_lv) + (status_get_max_hp(bl) * skill_lv / 100);
 				status_heal(bl, heal, 0, 0);
 			}
@@ -10789,9 +10791,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 
 	case SU_TUNABELLY:
 	{
-		int heal;
+		unsigned int heal;
 
-		if (!dstmd || dstmd->mob_id != MOBID_EMPERIUM || !mob_is_battleground(dstmd)) {
+		if (dstmd && (dstmd->mob_id == MOBID_EMPERIUM || mob_is_battleground(dstmd)))
+			heal = 0;
+		else {
 			heal = ((2 * skill_lv - 1) * 10) * status_get_max_hp(bl) / 100;
 			status_heal(bl, heal, 0, 0);
 		}