diff options
author | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-05 09:41:34 +0000 |
---|---|---|
committer | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-05 09:41:34 +0000 |
commit | ede34865036ce2e80885a0f945ab18f7dbde6e53 (patch) | |
tree | dc23addfa35559103b20d76da05aa9886eb43996 | |
parent | 3907b21df79b5c48c75ed90e91247184e0edf689 (diff) | |
download | hercules-ede34865036ce2e80885a0f945ab18f7dbde6e53.tar.gz hercules-ede34865036ce2e80885a0f945ab18f7dbde6e53.tar.bz2 hercules-ede34865036ce2e80885a0f945ab18f7dbde6e53.tar.xz hercules-ede34865036ce2e80885a0f945ab18f7dbde6e53.zip |
Running now resumes after dmg as well, see (r12488). (bugreport:1155)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12490 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/unit.c | 35 |
2 files changed, 33 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 635277115..db3262d8a 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,7 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2008/04/05 - * DMG no longer stops running. (r12486) [Kevin] + * DMG no longer stops running. (r12488) [Kevin] 2008/04/04 * PCs/Mobs/NPCs now block Leap(TK_HIGHJUMP) and sprint(TK_RUN). (r12485) [Kevin] * Disconnect user when receive select egg packet with no menu open. (r12484) [Kevin] diff --git a/src/map/unit.c b/src/map/unit.c index bd738e786..6270c6c7a 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -748,6 +748,27 @@ int unit_can_move(struct block_list *bl) return 1; } + +/*========================================== + * Resume running after a walk delay + *------------------------------------------*/ + +int unit_resume_running(int tid,unsigned int tick,int id,int data) +{ + + struct unit_data *ud = (struct unit_data *)data; + TBL_PC * sd = map_id2sd(id); + + clif_skill_nodamage(ud->bl,ud->bl,TK_RUN,ud->skilllv, + sc_start4(ud->bl,status_skill2sc(TK_RUN),100,ud->skilllv,unit_getdir(ud->bl),0,0,0)); + + if (sd) clif_walkok(sd); + + return 0; + +} + + /*========================================== * Applies walk delay to character, considering that * if type is 0, this is a damage induced delay: if previous delay is active, do not change it. @@ -772,9 +793,17 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int { //Minimal delay (walk-delay) disabled. Just stop walking. unit_stop_walking(bl,0); } else { - unit_stop_walking(bl,2); - if(ud->target) - add_timer(ud->canmove_tick+1, unit_walktobl_sub, bl->id, ud->target); + //Resume running after can move again [Kevin] + if(ud->state.running) + { + add_timer(ud->canmove_tick, unit_resume_running, bl->id, (int)ud); + } + else + { + unit_stop_walking(bl,2); + if(ud->target) + add_timer(ud->canmove_tick+1, unit_walktobl_sub, bl->id, ud->target); + } } } return 1; |