소스 검색

Resolved skill NK checks
* Fixes #2577.
* Adjusted the battle checks to properly return the NK value rather than bool.
Thanks to @darhylism!

aleos 7 년 전
부모
커밋
6decf6c6d0
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/map/battle.cpp

+ 3 - 3
src/map/battle.cpp

@@ -2448,12 +2448,12 @@ static int is_attack_piercing(struct Damage wd, struct block_list *src, struct b
 	return 0;
 	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);
 	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.
 	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;
 		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;
 }
 }
 
 
 /*================================================
 /*================================================