summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-08 12:42:16 -0300
committershennetsind <ind@henn.et>2013-07-08 12:42:16 -0300
commit19f0fcd80e004aeaf201112c90992f5342240f2d (patch)
tree4627998e15aec8324124a6105ac1857724a0d98c /src/map/unit.c
parentc1e0aab06dfad78c28aff1a4ddc60d599d96d223 (diff)
downloadhercules-19f0fcd80e004aeaf201112c90992f5342240f2d.tar.gz
hercules-19f0fcd80e004aeaf201112c90992f5342240f2d.tar.bz2
hercules-19f0fcd80e004aeaf201112c90992f5342240f2d.tar.xz
hercules-19f0fcd80e004aeaf201112c90992f5342240f2d.zip
Fixed Bug #7492
Special Thanks to Poison, Takkun. http://hercules.ws/board/tracker/issue-7492-checkidle-on-attack/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c11
1 files changed, 6 insertions, 5 deletions
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;
}