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 <schmunk@posteo.de>
This commit is contained in:
Lemongrass3110 2024-01-13 01:31:04 +01:00 committed by GitHub
parent c4026c08c8
commit 1362c7666d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<<tstatus->def_ele) || sd->right_weapon.ignore_def_ele & (1<<ELE_ALL) ||
sd->right_weapon.ignore_def_race & (1<<tstatus->race) || sd->right_weapon.ignore_def_race & (1<<RC_ALL) ||
@ -3258,8 +3262,7 @@ static bool attack_ignores_def(struct Damage* wd, struct block_list *src, struct
} else if (weapon_position == EQI_HAND_L)
return true;
}
} else if (skill_id == RK_WINDCUTTER && sd && sd->status.weapon == W_2HSWORD)
return true;
}
return nk[NK_IGNOREDEFENSE] != 0;
}