summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-01 09:54:42 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-01 09:54:42 +0000
commitdee07da505f2c6ceeeed2adea3c41d8e050a043d (patch)
tree6051a8fd148294cb8e856d79f7e9ea4ea15915a8
parent2f7c175ff20ed06b065b15976275cc0c32350330 (diff)
downloadhercules-dee07da505f2c6ceeeed2adea3c41d8e050a043d.tar.gz
hercules-dee07da505f2c6ceeeed2adea3c41d8e050a043d.tar.bz2
hercules-dee07da505f2c6ceeeed2adea3c41d8e050a043d.tar.xz
hercules-dee07da505f2c6ceeeed2adea3c41d8e050a043d.zip
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
-rw-r--r--src/map/mob.c6
1 files changed, 4 insertions, 2 deletions
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)