diff options
author | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-09-04 23:41:59 +0000 |
---|---|---|
committer | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-09-04 23:41:59 +0000 |
commit | ad176fadd0e7e095f91f122776ccaad6f3416540 (patch) | |
tree | edc1ec913dbb9e2db9fe2430a321d5252099b66a /src | |
parent | 1963a8147972d6febede94ff5ff51f6642fb9551 (diff) | |
download | hercules-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')
-rw-r--r-- | src/common/mmo.h | 2 | ||||
-rw-r--r-- | src/map/mercenary.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h index fc48f3194..94c72690f 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -107,7 +107,7 @@ //Mercenary System #define MC_SKILLBASE 8201 #define MAX_MERCSKILL 37 -#define MAX_MERCENARY_CLASS 30 +#define MAX_MERCENARY_CLASS 36 enum item_types { IT_HEALING = 0, 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); |