summaryrefslogtreecommitdiff
path: root/src/map/skill.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-11-24 07:24:07 +0100
committerHaru <haru@dotalux.com>2017-11-24 07:24:07 +0100
commit34a18710fe25efaead50cf10b18a27d1d74e7c09 (patch)
tree04303cdd4d21186fbd42ecee3898d9e6015669ae /src/map/skill.h
parentc1c8d6b7424b6673bd444b0905171c06602feaa4 (diff)
downloadhercules-34a18710fe25efaead50cf10b18a27d1d74e7c09.tar.gz
hercules-34a18710fe25efaead50cf10b18a27d1d74e7c09.tar.bz2
hercules-34a18710fe25efaead50cf10b18a27d1d74e7c09.tar.xz
hercules-34a18710fe25efaead50cf10b18a27d1d74e7c09.zip
Allow using the skill DB accessors on non-skill attacks (skill_id = 0)
This suppresses an assertion in the skill DB accessors when called with `skill_id = 0` (such as during normal attacks). In such case, they'll now return an appropriate zero value, as it happened before 2b4bfa5d0. Fixes #1909 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.h')
-rw-r--r--src/map/skill.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/skill.h b/src/map/skill.h
index a0591de74..1e00e488f 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -76,6 +76,7 @@ struct status_change_entry;
//Constants to identify the skill's inf value:
enum e_skill_inf {
+ INF_NONE = 0x00,
INF_ATTACK_SKILL = 0x01,
INF_GROUND_SKILL = 0x02,
INF_SELF_SKILL = 0x04, // Skills casted on self where target is automatically chosen
@@ -88,6 +89,7 @@ enum e_skill_inf {
//The NK value applies only to non INF_GROUND_SKILL skills
//when determining skill castend function to invoke.
enum e_skill_nk {
+ NK_NONE = 0x00,
NK_NO_DAMAGE = 0x01,
NK_SPLASH = 0x02|0x04, // 0x4 = splash & split
NK_SPLASH_ONLY = 0x02,
@@ -102,6 +104,7 @@ enum e_skill_nk {
//A skill with 3 would be no damage + splash: area of effect.
//Constants to identify a skill's inf2 value.
enum e_skill_inf2 {
+ INF2_NONE = 0x00000,
INF2_QUEST_SKILL = 0x00001,
INF2_NPC_SKILL = 0x00002, // NPC skills are those that players can't have in their skill tree.
INF2_WEDDING_SKILL = 0x00004,
@@ -132,6 +135,7 @@ enum e_skill_display {
};
enum {
+ UF_NONE = 0x0000,
UF_DEFNOTENEMY = 0x0001, // If 'defunit_not_enemy' is set, the target is changed to 'friend'
UF_NOREITERATION = 0x0002, // Spell cannot be stacked
UF_NOFOOTSET = 0x0004, // Spell cannot be cast near/on targets
@@ -158,7 +162,7 @@ enum wl_spheres {
};
enum {
- ST_NONE,
+ ST_NONE = 0,
ST_HIDING,
ST_CLOAKING,
ST_HIDDEN,