diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mob.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index ccfc5f53c..4c277de78 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1003,6 +1003,11 @@ int mob_unlocktarget(struct mob_data *md,int tick) mob_script_callback(md, map_id2bl(md->target_id), CALLBACK_UNLOCK); switch (md->state.skillstate) { + case MSS_WALK: + if (md->ud.walktimer != -1) + break; + //Because it is not unset when the mob finishes walking. + md->state.skillstate = MSS_IDLE; case MSS_IDLE: // Idle skill. if (!(++md->ud.walk_count%IDLE_SKILL_INTERVAL) && @@ -1015,8 +1020,6 @@ int mob_unlocktarget(struct mob_data *md,int tick) //Delay next random walk when this one failed. md->next_walktime=tick+rand()%3000; break; - case MSS_WALK: - break; default: mob_stop_attack(md); if (battle_config.mob_ai&0x8) |