From dee07da505f2c6ceeeed2adea3c41d8e050a043d Mon Sep 17 00:00:00 2001 From: gepard1984 Date: Wed, 1 Feb 2012 09:54:42 +0000 Subject: Mob_db `adelay` and `amotion` values sanitizing (related bugreport:3968). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15536 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index a620959ea..3793cecae 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3567,8 +3567,10 @@ static bool mob_parse_dbrow(char** str) status->speed = atoi(str[26]); status->aspd_rate = 1000; - status->adelay = atoi(str[27]); - status->amotion = atoi(str[28]); + i = atoi(str[27]); + status->adelay = cap_value(i, battle_config.monster_max_aspd*2, 4000); + i = atoi(str[28]); + status->amotion = cap_value(i, battle_config.monster_max_aspd, 2000); //If the attack animation is longer than the delay, the client crops the attack animation! //On aegis there is no real visible effect of having a recharge-time less than amotion anyway. if (status->adelay < status->amotion) -- cgit v1.2.3-70-g09d2