From 1ee38cb82d69a58dbff91a148d68658ab679e352 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 24 Apr 2006 02:45:17 +0000 Subject: - Idle skills won't trigger while the mob is walking. - Idle skills will now trigger each IDLE_SKILL_INTERVAL iterations (10 currently) - Added support for walk packet 0x22c (disabled currently as it's non-walk packet equivalent is yet missing), it will be used when PACKETVER is set to 7 or above. - Normal walking will now also trigger mob skills (due to the walk skill condition) - Updated mob_skill_db: all idle and walk skills had their rate go up x10. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6245 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index ba33bc8d2..d86224f22 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -190,12 +190,11 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data) sc_start(&sd->bl,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration); } } else if (md) { - if (ud->target && ud->state.attack_continue) { - if(md->min_chase > md->db->range2) md->min_chase--; - if(!(ud->walk_count%WALK_SKILL_INTERVAL) && - mobskill_use(md, tick, -1)) - return 0; - } + if (md->min_chase > md->db->range2) md->min_chase--; + //Walk skills are triggered regardless of target due to the idle-walk mob state. + if(!(ud->walk_count%WALK_SKILL_INTERVAL) && + mobskill_use(md, tick, -1)) + return 0; } if(ud->state.change_walk_target) -- cgit v1.2.3-70-g09d2