From 442f3ce3b9a8af792d874c0b0b62343fa229c7a4 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 2 Aug 2006 23:47:33 +0000 Subject: - Added a check in the walking code when triggering skills. NPC_SELFDESTRUCTION will no longer cancel walking, it will instead resend the walk packet, this effectively causes the mob to start walking (clientside) while the cast-bar is showing. - Updated the mob skills so that the marine sphere casts self-destruction with 3 second cast after it starts walking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8079 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/unit.c b/src/map/unit.c index a230881fa..11eeb1387 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -205,8 +205,13 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data) !(ud->walk_count%WALK_SKILL_INTERVAL) && mobskill_use(md, tick, -1)) { - clif_fixpos(bl); //Fix position as walk has been cancelled. - return 0; + if (!(ud->skillid == NPC_SELFDESTRUCTION && ud->skilltimer != -1)) + { //Skill used, abort walking + clif_fixpos(bl); //Fix position as walk has been cancelled. + return 0; + } + //Resend walk packet for proper Self Destruction display. + clif_move(bl); } } @@ -943,7 +948,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 ); if(sd && pc_checkskill(sd,SA_FREECAST)) status_freecast_switch(sd); - else if (skill_num != NPC_SELFDESTRUCTION) //Required for Marine Spheres + else unit_stop_walking(src,1); } else -- cgit v1.2.3-60-g2f50