diff options
author | Haru <haru@dotalux.com> | 2019-11-17 22:46:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-17 22:46:25 +0100 |
commit | e09c7e12b329314b94a3b68dad3e9f76f256cc79 (patch) | |
tree | 217d4f8df9033db3c914de186381f28fb32941b0 /src/map/skill.c | |
parent | 61e6b22b12cb66bd3bb6bc1268228ea7d5e2519b (diff) | |
parent | cbaf343e8310dd068a04e8a96979e780233d0a9c (diff) | |
download | hercules-e09c7e12b329314b94a3b68dad3e9f76f256cc79.tar.gz hercules-e09c7e12b329314b94a3b68dad3e9f76f256cc79.tar.bz2 hercules-e09c7e12b329314b94a3b68dad3e9f76f256cc79.tar.xz hercules-e09c7e12b329314b94a3b68dad3e9f76f256cc79.zip |
Merge pull request #2573 from Asheraf/dehardcodecomboskills
Dehardcode combo skills check
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 7451fbf41..ad974c10b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13962,27 +13962,9 @@ static int skill_isammotype(struct map_session_data *sd, int skill_id) **/ static bool skill_is_combo(int skill_id) { - switch( skill_id ) - { - case MO_CHAINCOMBO: - case MO_COMBOFINISH: - case CH_TIGERFIST: - case CH_CHAINCRUSH: - case MO_EXTREMITYFIST: - case TK_TURNKICK: - case TK_STORMKICK: - case TK_DOWNKICK: - case TK_COUNTER: - case TK_JUMPKICK: - case HT_POWER: - case GC_COUNTERSLASH: - case GC_WEAPONCRUSH: - case SR_FALLENEMPIRE: - case SR_DRAGONCOMBO: - case SR_TIGERCANNON: - case SR_GATEOFHELL: - return true; - } + if (skill->get_inf2(skill_id) & INF2_IS_COMBO_SKILL) + return true; + return false; } @@ -20279,6 +20261,12 @@ static void skill_validate_skillinfo(struct config_setting_t *conf, struct s_ski } else { sk->inf2 &= ~INF2_HIDDEN_TRAP; } + } else if (strcmpi(type, "IsCombo") == 0) { + if (on) { + sk->inf2 |= INF2_IS_COMBO_SKILL; + } else { + sk->inf2 &= ~INF2_IS_COMBO_SKILL; + } } else if (strcmpi(type, "None") != 0) { skilldb_invalid_error(type, config_setting_name(t), sk->nameid); } |