diff options
author | Haru <haru@dotalux.com> | 2015-12-14 23:59:48 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-28 18:36:00 +0100 |
commit | 5db7c13c4a37bc688a464d369beab0bc31984bd5 (patch) | |
tree | 837d872b0d0caa0960dc4335f2946cf08a055a89 /src/map/mercenary.c | |
parent | b519d163bb4d0fef7deb821ee72ae67519d84d54 (diff) | |
download | hercules-5db7c13c4a37bc688a464d369beab0bc31984bd5.tar.gz hercules-5db7c13c4a37bc688a464d369beab0bc31984bd5.tar.bz2 hercules-5db7c13c4a37bc688a464d369beab0bc31984bd5.tar.xz hercules-5db7c13c4a37bc688a464d369beab0bc31984bd5.zip |
Added merc_id, replaced numeric mercenary IDs with enum members
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r-- | src/map/mercenary.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 4e3c8508d..fb801a8da 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -127,11 +127,11 @@ int mercenary_get_guild(struct mercenary_data *md) class_ = md->db->class_; - if( class_ >= 6017 && class_ <= 6026 ) + if (class_ >= MERID_MER_ARCHER01 && class_ <= MERID_MER_ARCHER10) return ARCH_MERC_GUILD; - if( class_ >= 6027 && class_ <= 6036 ) + if (class_ >= MERID_MER_LANCER01 && class_ <= MERID_MER_LANCER10) return SPEAR_MERC_GUILD; - if( class_ >= 6037 && class_ <= 6046 ) + if (class_ >= MERID_MER_SWORDMAN01 && class_ <= MERID_MER_SWORDMAN10) return SWORD_MERC_GUILD; return -1; @@ -147,11 +147,11 @@ int mercenary_get_faith(struct mercenary_data *md) class_ = md->db->class_; - if( class_ >= 6017 && class_ <= 6026 ) + if (class_ >= MERID_MER_ARCHER01 && class_ <= MERID_MER_ARCHER10) return sd->status.arch_faith; - if( class_ >= 6027 && class_ <= 6036 ) + if (class_ >= MERID_MER_LANCER01 && class_ <= MERID_MER_LANCER10) return sd->status.spear_faith; - if( class_ >= 6037 && class_ <= 6046 ) + if (class_ >= MERID_MER_SWORDMAN01 && class_ <= MERID_MER_SWORDMAN10) return sd->status.sword_faith; return 0; @@ -167,11 +167,11 @@ int mercenary_set_faith(struct mercenary_data *md, int value) class_ = md->db->class_; - if( class_ >= 6017 && class_ <= 6026 ) + if (class_ >= MERID_MER_ARCHER01 && class_ <= MERID_MER_ARCHER10) faith = &sd->status.arch_faith; - else if( class_ >= 6027 && class_ <= 6036 ) + else if (class_ >= MERID_MER_LANCER01 && class_ <= MERID_MER_LANCER10) faith = &sd->status.spear_faith; - else if( class_ >= 6037 && class_ <= 6046 ) + else if (class_ >= MERID_MER_SWORDMAN01 && class_ <= MERID_MER_SWORDMAN10) faith = &sd->status.sword_faith; else return 0; @@ -193,11 +193,11 @@ int mercenary_get_calls(struct mercenary_data *md) class_ = md->db->class_; - if( class_ >= 6017 && class_ <= 6026 ) + if (class_ >= MERID_MER_ARCHER01 && class_ <= MERID_MER_ARCHER10) return sd->status.arch_calls; - if( class_ >= 6027 && class_ <= 6036 ) + if (class_ >= MERID_MER_LANCER01 && class_ <= MERID_MER_LANCER10) return sd->status.spear_calls; - if( class_ >= 6037 && class_ <= 6046 ) + if (class_ >= MERID_MER_SWORDMAN01 && class_ <= MERID_MER_SWORDMAN10) return sd->status.sword_calls; return 0; @@ -213,11 +213,11 @@ int mercenary_set_calls(struct mercenary_data *md, int value) class_ = md->db->class_; - if( class_ >= 6017 && class_ <= 6026 ) + if (class_ >= MERID_MER_ARCHER01 && class_ <= MERID_MER_ARCHER10) calls = &sd->status.arch_calls; - else if( class_ >= 6027 && class_ <= 6036 ) + else if (class_ >= MERID_MER_LANCER01 && class_ <= MERID_MER_LANCER10) calls = &sd->status.spear_calls; - else if( class_ >= 6037 && class_ <= 6046 ) + else if (class_ >= MERID_MER_SWORDMAN01 && class_ <= MERID_MER_SWORDMAN10) calls = &sd->status.sword_calls; else return 0; |