Browse Source

Corrected SU_TUNAPARTY (#8904)

* The shield is now according to the Caster's MaxHP%

Fixed #8125

Thanks to @Melk3000

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Atemo 4 tháng trước cách đây
mục cha
commit
46b9767eed
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/map/status.cpp

+ 3 - 3
src/map/status.cpp

@@ -12174,9 +12174,9 @@ int32 status_change_start(struct block_list* src, struct block_list* bl,enum sc_
 			}
 			break;
 		case SC_TUNAPARTY:
-			val2 = (status->max_hp * (val1 * 10) / 100); // Max HP% to absorb
-			if (sd && pc_checkskill(sd, SU_SPIRITOFSEA))
-				val2 *= 2; // Double the shield life
+			val2 = status_get_max_hp(src) * (val1 * 10) / 100; // Shield according to the Caster's MaxHP%
+			if (map_session_data* ssd = BL_CAST(BL_PC, src); pc_checkskill(ssd, SU_SPIRITOFSEA) > 0)
+				val2 *= 2; // Double the shield life if the caster has learned Spirit of Sea
 			break;
 		case SC_HISS:
 			val2 = 50; // Perfect Dodge