diff options
author | Haru <haru@dotalux.com> | 2017-10-30 01:59:04 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-11-05 18:30:44 +0100 |
commit | 09d5c20572424e7a92dff5cf560001278c6ffaa0 (patch) | |
tree | e9a1f3347e58b85f0cd6d9e39fbf986e1b08b16b /src/map/skill.c | |
parent | 581f8c7393757ea70c4aaa64f6e20b57f74a32ae (diff) | |
download | hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.tar.gz hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.tar.bz2 hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.tar.xz hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.zip |
Reduce confusion between skill IDs and skill DB indexes (part 2)
Remove MAX_SKILL in favor of MAX_SKILL_DB, when referring to the
maximum skill DB index. This is opposed to MAX_SKILL_ID, the maximum
skill ID.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index d2db6c1bb..710b4d403 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -18813,7 +18813,7 @@ int skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) struct map_session_data *sd = map->id2sd(id); struct skill_cd * cd = NULL; - if (data <= 0 || data >= MAX_SKILL) + if (data <= 0 || data >= MAX_SKILL_DB) return 0; if (!sd || !sd->blockskill[data]) return 0; @@ -18949,7 +18949,7 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick) int skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { struct homun_data *hd = map->id2hd(id); - if (data <= 0 || data >= MAX_SKILL) + if (data <= 0 || data >= MAX_SKILL_DB) return 0; if (hd != NULL) hd->blockskill[data] = 0; @@ -18978,7 +18978,7 @@ int skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) int skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { struct mercenary_data *md = map->id2mc(id); - if (data <= 0 || data >= MAX_SKILL) + if (data <= 0 || data >= MAX_SKILL_DB) return 0; if (md != NULL) md->blockskill[data] = 0; @@ -20855,7 +20855,7 @@ bool skill_read_skilldb(const char *filename) struct config_setting_t *sk, *conf; char filepath[256]; int count=0, index=0; - bool duplicate[MAX_SKILL] = {0}; + bool duplicate[MAX_SKILL_DB] = {0}; nullpo_retr(false, filename); |