summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-11-17 22:46:25 +0100
committerGitHub <noreply@github.com>2019-11-17 22:46:25 +0100
commite09c7e12b329314b94a3b68dad3e9f76f256cc79 (patch)
tree217d4f8df9033db3c914de186381f28fb32941b0 /src/map
parent61e6b22b12cb66bd3bb6bc1268228ea7d5e2519b (diff)
parentcbaf343e8310dd068a04e8a96979e780233d0a9c (diff)
downloadhercules-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')
-rw-r--r--src/map/skill.c30
-rw-r--r--src/map/skill.h1
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
};