From 5f4fd5c98bb5841aba048326e2f0ca6e6f76c45c Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Sun, 28 Aug 2022 17:02:37 +0200 Subject: [PATCH] Fixed some more SC_STONEWAIT issues (#7212) Fixed PR_STRECOVERY not clearing SC_STONEWAIT Fixed that ending SC_STONEWAIT manually still triggered SC_STONE Thanks to @Singe-Horizontal and @aleos89 --- src/map/skill.cpp | 7 ++++--- src/map/status.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/map/skill.cpp b/src/map/skill.cpp index b483733928..6c3fe18390 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -8803,15 +8803,16 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui clif_skill_nodamage(src,bl,skill_id,skill_lv,0); break; } - if (tsc && tsc->opt1) { + if (tsc) { status_change_end(bl, SC_FREEZE); + status_change_end(bl, SC_STONEWAIT); status_change_end(bl, SC_STONE); status_change_end(bl, SC_SLEEP); status_change_end(bl, SC_STUN); status_change_end(bl, SC_WHITEIMPRISON); + status_change_end(bl, SC_STASIS); + status_change_end(bl, SC_NETHERWORLD); } - status_change_end(bl, SC_STASIS); - status_change_end(bl, SC_NETHERWORLD); if(battle_check_undead(tstatus->race,tstatus->def_ele)) skill_addtimerskill(src, tick+1000, bl->id, 0, 0, skill_id, skill_lv, 100, flag); clif_skill_nodamage(src,bl,skill_id,skill_lv,1); diff --git a/src/map/status.cpp b/src/map/status.cpp index 42005bdae0..2c906513ce 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -13434,8 +13434,8 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid) if(opt_flag[SCF_ONTOUCH] && sd && !sd->state.warping && map_getcell(bl->m,bl->x,bl->y,CELL_CHKNPC)) npc_touch_area_allnpc(sd,bl->m,bl->x,bl->y); // Trigger on-touch event. - // Needed to be here to make sure OPT1_STONEWAIT has been cleared from the target - if (type == SC_STONEWAIT) + // Needed to be here to make sure OPT1_STONEWAIT has been cleared from the target (only on natural expiration of the stone wait timer) + if (type == SC_STONEWAIT && tid != INVALID_TIMER) status_change_start(bl, bl, SC_STONE, 100, sce->val1, sce->val2, 0, 0, sce->val3, SCSTART_NOAVOID); ers_free(sc_data_ers, sce);