summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 23:47:33 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 23:47:33 +0000
commit442f3ce3b9a8af792d874c0b0b62343fa229c7a4 (patch)
tree2f82613ab9a3c1a3d7a1fbb4dfbcf84a2cc30f68 /src/map/unit.c
parent57fbe69be8382e1f659dad2e7d9ae3ecc1c273d7 (diff)
downloadhercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.tar.gz
hercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.tar.bz2
hercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.tar.xz
hercules-442f3ce3b9a8af792d874c0b0b62343fa229c7a4.zip
- 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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c11
1 files changed, 8 insertions, 3 deletions
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