From ad176fadd0e7e095f91f122776ccaad6f3416540 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Thu, 4 Sep 2008 23:41:59 +0000 Subject: * 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 --- src/map/mercenary.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/map') 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); -- cgit v1.2.3-70-g09d2