diff options
author | Dastgir <dastgirpojee@rocketmail.com> | 2015-12-04 20:42:30 +0530 |
---|---|---|
committer | Dastgir <dastgirpojee@rocketmail.com> | 2015-12-04 21:14:10 +0530 |
commit | a38909503d98e8fe823c9f59bb94af8675563828 (patch) | |
tree | aabdae0ead911f4a18966d091283787e72ebcf51 /src/map/unit.c | |
parent | 6abd0fb8b1bbfe2101cc68503897b0449027fb3d (diff) | |
download | hercules-a38909503d98e8fe823c9f59bb94af8675563828.tar.gz hercules-a38909503d98e8fe823c9f59bb94af8675563828.tar.bz2 hercules-a38909503d98e8fe823c9f59bb94af8675563828.tar.xz hercules-a38909503d98e8fe823c9f59bb94af8675563828.zip |
Added a function to update idle time
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 7c253c5c2..997ab5b7c 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); } |