summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-28 23:48:06 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-28 23:48:06 +0300
commitcb6e0f1b68ad76402f00968ea6ea65758daa8fbd (patch)
treebbb13e6d59b0143817e559c9fb8f6a9656fe864e /src/map/mercenary.c
parent296e6c04a4c1a01a233c937bd198a31fa849f49c (diff)
parentf1afe0dfee7f97d46f6dad924f75d08956d17620 (diff)
downloadhercules-cb6e0f1b68ad76402f00968ea6ea65758daa8fbd.tar.gz
hercules-cb6e0f1b68ad76402f00968ea6ea65758daa8fbd.tar.bz2
hercules-cb6e0f1b68ad76402f00968ea6ea65758daa8fbd.tar.xz
hercules-cb6e0f1b68ad76402f00968ea6ea65758daa8fbd.zip
Merge pull request #955 from HerculesWS/src-id-constants
Replaced several numeric constants with enums
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c30
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;