diff options
author | Asheraf <acheraf1998@gmail.com> | 2019-10-29 21:01:58 +0100 |
---|---|---|
committer | Asheraf <acheraf1998@gmail.com> | 2019-10-29 21:01:58 +0100 |
commit | cbaf343e8310dd068a04e8a96979e780233d0a9c (patch) | |
tree | 1f832c69070f3ef1fcbcb2a6f3aba22d6861f34b /src/map | |
parent | 857650c4f58d347455b0d075b49a53f69e6d0c51 (diff) | |
download | hercules-cbaf343e8310dd068a04e8a96979e780233d0a9c.tar.gz hercules-cbaf343e8310dd068a04e8a96979e780233d0a9c.tar.bz2 hercules-cbaf343e8310dd068a04e8a96979e780233d0a9c.tar.xz hercules-cbaf343e8310dd068a04e8a96979e780233d0a9c.zip |
Dehardcode combo skills check
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/skill.c | 30 | ||||
-rw-r--r-- | src/map/skill.h | 1 |
2 files changed, 10 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); } diff --git a/src/map/skill.h b/src/map/skill.h index 5da37d129..fe5cb6282 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -125,6 +125,7 @@ enum e_skill_inf2 { INF2_SHOW_SKILL_SCALE = 0x20000, INF2_ALLOW_REPRODUCE = 0x40000, INF2_HIDDEN_TRAP = 0x80000, // Traps that are hidden (based on trap_visiblity battle conf) + INF2_IS_COMBO_SKILL = 0x100000, // Sets whether a skill can be used in combos or not }; |