summaryrefslogtreecommitdiff
path: root/src/map/mercenary.c
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-04 23:41:59 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-04 23:41:59 +0000
commitad176fadd0e7e095f91f122776ccaad6f3416540 (patch)
treeedc1ec913dbb9e2db9fe2430a321d5252099b66a /src/map/mercenary.c
parent1963a8147972d6febede94ff5ff51f6642fb9551 (diff)
downloadhercules-ad176fadd0e7e095f91f122776ccaad6f3416540.tar.gz
hercules-ad176fadd0e7e095f91f122776ccaad6f3416540.tar.bz2
hercules-ad176fadd0e7e095f91f122776ccaad6f3416540.tar.xz
hercules-ad176fadd0e7e095f91f122776ccaad6f3416540.zip
* Updated mmo.h, increased merc max count to 36.
* Fixed save crash related to non-guilded mercenaries. * Removed job and level restriction on Mercenary ASPD potions. * Added Monster Mercenaries using mobs original stats. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13192 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mercenary.c')
-rw-r--r--src/map/mercenary.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 566aab6c1..4775f9beb 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -110,6 +110,8 @@ int mercenary_get_faith(struct mercenary_data *md)
return sd->status.spear_faith;
if( class_ >= 6037 && class_ <= 6046 )
return sd->status.sword_faith;
+ else
+ return 0;
return 0;
}
@@ -130,6 +132,8 @@ int mercenary_set_faith(struct mercenary_data *md, int value)
faith = &sd->status.spear_faith;
else if( class_ >= 6037 && class_ <= 6046 )
faith = &sd->status.sword_faith;
+ else
+ return 0;
*faith += value;
*faith = cap_value(*faith, 0, SHRT_MAX);
@@ -154,6 +158,8 @@ int mercenary_get_calls(struct mercenary_data *md)
return sd->status.spear_calls;
if( class_ >= 6037 && class_ <= 6046 )
return sd->status.sword_calls;
+ else
+ return 0;
return 0;
}
@@ -174,6 +180,8 @@ int mercenary_set_calls(struct mercenary_data *md, int value)
calls = &sd->status.spear_calls;
else if( class_ >= 6037 && class_ <= 6046 )
calls = &sd->status.sword_calls;
+ else
+ return 0;
*calls += value;
*calls = cap_value(*calls, 0, INT_MAX);