summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-04 18:47:48 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-04 18:47:48 +0300
commitda6300af9e1529fa2f98cb7481b8a89e17627aa5 (patch)
treebe0733a09d5e7a4eb560e8ea7a8a4b0a88743a0a /src/map/unit.c
parent1e2f24a2fcb13b8a2fe06f4cc829670303760929 (diff)
parenta38909503d98e8fe823c9f59bb94af8675563828 (diff)
downloadhercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.tar.gz
hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.tar.bz2
hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.tar.xz
hercules-da6300af9e1529fa2f98cb7481b8a89e17627aa5.zip
Merge pull request #910 from dastgir/idle
Added a function to update idle time
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 3046db9e1..7f53966e2 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2169,8 +2169,8 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) {
if(ud->state.attack_continue) {
unit->setdir(src, map->calc_dir(src, target->x, target->y));
- if( src->type == BL_PC && battle_config.idletime_criteria & BCIDLE_ATTACK )
- ((TBL_PC*)src)->idletime = sockt->last_tick;
+ if( src->type == BL_PC )
+ pc->update_idle_time(sd, BCIDLE_ATTACK);
ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0);
}