summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-02 18:22:02 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-02 18:22:02 +0000
commit83de953a5fe5c1316abd3171a01f3e751edab3d1 (patch)
tree79c3e2082ff1dd82335693175f54d0b80016dddf /src/map/mob.c
parent78f55689894725d4ec08fc2a86628bc585718415 (diff)
downloadhercules-83de953a5fe5c1316abd3171a01f3e751edab3d1.tar.gz
hercules-83de953a5fe5c1316abd3171a01f3e751edab3d1.tar.bz2
hercules-83de953a5fe5c1316abd3171a01f3e751edab3d1.tar.xz
hercules-83de953a5fe5c1316abd3171a01f3e751edab3d1.zip
* Reduced MAX_SKILL_LEVEL to 10
* Tidied up parts in skill_castfix a bit * Fixed map-server crashing if an empty line was added in any of the skill-xx db files * Updated skill_castnodex reading git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 539a10c1a..4f80c23bb 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4205,7 +4205,10 @@ static int mob_readskilldb(void)
ms->state=state[j].id;
}
ms->skill_id=atoi(sp[3]);
- ms->skill_lv=atoi(sp[4]);
+ j=atoi(sp[4]);
+ if (j<=0 || j>MAX_SKILL_DB)
+ continue;
+ ms->skill_lv=j;
ms->permillage=atoi(sp[5]);
ms->casttime=atoi(sp[6]);
ms->delay=atoi(sp[7]);