From 6decf6c6d05d016e10eabddd025775e68f2ad1d7 Mon Sep 17 00:00:00 2001 From: aleos Date: Mon, 6 Nov 2017 17:16:45 -0500 Subject: [PATCH] Resolved skill NK checks * Fixes #2577. * Adjusted the battle checks to properly return the NK value rather than bool. Thanks to @darhylism! --- src/map/battle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 0c179a7184..bcddca7736 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -2448,12 +2448,12 @@ static int is_attack_piercing(struct Damage wd, struct block_list *src, struct b return 0; } -static bool battle_skill_get_damage_properties(uint16 skill_id, int is_splash) +static int battle_skill_get_damage_properties(uint16 skill_id, int is_splash) { int nk = skill_get_nk(skill_id); if( !skill_id && is_splash ) //If flag, this is splash damage from Baphomet Card and it always hits. nk |= NK_NO_CARDFIX_ATK|NK_IGNORE_FLEE; - return nk > 0; + return nk; } /*============================= @@ -2667,7 +2667,7 @@ static bool attack_ignores_def(struct Damage wd, struct block_list *src, struct } } - return (nk&NK_IGNORE_DEF) > 0; + return (nk&NK_IGNORE_DEF) != 0; } /*================================================