From 94a731aad020b0f7fba89e3af335ec6cc9f01f75 Mon Sep 17 00:00:00 2001 From: Aleos Date: Fri, 2 Aug 2024 09:33:53 -0400 Subject: [PATCH] Correct Death Valley behavior (#8502) * Follow up to 4b32621. * The target player should be healed from the remaining SP before the SP reduction is applied. * Update HP/SP without sending extra packets. * Fix SP ratio. --------- Co-authored-by: Atemo Co-authored-by: Lemongrass3110 --- src/map/skill.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index c15ecc239b..43862587ed 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -11705,15 +11705,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if( !status_isdead(bl) ) break; - status_zap(bl, 0, tstatus->sp * 10 * skill_lv / 100); - - int heal = tstatus->sp; - - if( heal <= 0 ) - heal = 1; - tstatus->hp = heal; + tstatus->hp = max(tstatus->sp, 1); + tstatus->sp -= tstatus->sp * ( 60 - 10 * skill_lv ) / 100; clif_skill_nodamage(src,bl,skill_id,skill_lv,1); - pc_revive((TBL_PC*)bl,heal,0); + pc_revive(reinterpret_cast(bl),true,true); clif_resurrection( *bl ); } break;