From 81289b916f65036bcab0c292d433ee2a2e9aa8c6 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 16 Mar 2006 02:17:48 +0000 Subject: - Fixed mob random walk interval being set to up to 6K seconds in some instances. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5621 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 2 +- src/map/skill.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/mob.c b/src/map/mob.c index 822eb61d9..b469ab12e 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1929,7 +1929,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) { if (DIFF_TICK(md->next_walktime, tick) > 7000 && (md->walkpath.path_len == 0 || md->walkpath.path_pos >= md->walkpath.path_len)) - md->next_walktime = tick + 3000 * rand() % 2000; + md->next_walktime = tick + 3000 + rand() % 2000; // Random movement if (mob_randomwalk(md,tick)) return 0; diff --git a/src/map/skill.c b/src/map/skill.c index 137c812e9..33bd65255 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -779,10 +779,10 @@ int skillnotok(int skillid, struct map_session_data *sd) if (i >= GD_SKILLBASE) i = GD_SKILLRANGEMIN + i - GD_SKILLBASE; - if (sd->blockskill[i] > 0) + if (i > MAX_SKILL || i < 0) return 1; - if (i > MAX_SKILL || i < 0) + if (sd->blockskill[i] > 0) return 1; if (battle_config.gm_skilluncond && pc_isGM(sd) >= battle_config.gm_skilluncond) -- cgit v1.2.3-70-g09d2