From 1362c7666d34e86042dbd2994f62509da9473da0 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Sat, 13 Jan 2024 01:31:04 +0100 Subject: [PATCH] Fixed RK_WINDCUTTER not ignoring def (#8102) The order of the checks was wrong and therefore the if could never be reached. Co-authored-by: munkrej --- src/map/battle.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index a6564c7da2..03e74746dd 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -3240,7 +3240,11 @@ static bool attack_ignores_def(struct Damage* wd, struct block_list *src, struct #endif if (sc && sc->getSCE(SC_FUSION)) return true; - else if (skill_id != CR_GRANDCROSS && skill_id != NPC_GRANDDARKNESS) + + if (skill_id == RK_WINDCUTTER && sd && sd->status.weapon == W_2HSWORD) + return true; + + if (skill_id != CR_GRANDCROSS && skill_id != NPC_GRANDDARKNESS) { //Ignore Defense? if (sd && (sd->right_weapon.ignore_def_ele & (1<def_ele) || sd->right_weapon.ignore_def_ele & (1<right_weapon.ignore_def_race & (1<race) || sd->right_weapon.ignore_def_race & (1<status.weapon == W_2HSWORD) - return true; + } return nk[NK_IGNOREDEFENSE] != 0; }