From 19f0fcd80e004aeaf201112c90992f5342240f2d Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 8 Jul 2013 12:42:16 -0300 Subject: Fixed Bug #7492 Special Thanks to Poison, Takkun. http://hercules.ws/board/tracker/issue-7492-checkidle-on-attack/ Signed-off-by: shennetsind --- src/map/unit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 72e4b136e..ce097dda0 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1815,14 +1815,12 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t if( !battle_config.sdelay_attack_enable && DIFF_TICK(ud->canact_tick,tick) > 0 && !(sd && pc->checkskill(sd,SA_FREECAST) > 0) ) { // attacking when under cast delay has restrictions: - if( tid == INVALID_TIMER ) - { //requested attack. + if( tid == INVALID_TIMER ) { //requested attack. if(sd) clif->skill_fail(sd,1,USESKILL_FAIL_SKILLINTERVAL,0); return 0; } //Otherwise, we are in a combo-attack, delay this until your canact time is over. [Skotlex] - if( ud->state.attack_continue ) - { + if( ud->state.attack_continue ) { if( DIFF_TICK(ud->canact_tick, ud->attackabletime) > 0 ) ud->attackabletime = ud->canact_tick; ud->attacktimer=iTimer->add_timer(ud->attackabletime,unit_attack_timer,src->id,0); @@ -1892,8 +1890,11 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t unit_set_walkdelay(src, tick, sstatus->amotion, 1); } - if(ud->state.attack_continue) + if(ud->state.attack_continue) { + if( src->type == BL_PC ) + ((TBL_PC*)src)->idletime = last_tick; ud->attacktimer = iTimer->add_timer(ud->attackabletime,unit_attack_timer,src->id,0); + } return 1; } -- cgit v1.2.3-60-g2f50