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 <Atemo@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
Aleos 2024-08-02 09:33:53 -04:00 committed by GitHub
parent effd55d1ce
commit 94a731aad0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<map_session_data*>(bl),true,true);
clif_resurrection( *bl );
}
break;