diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-14 06:41:09 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-14 06:41:09 +0000 |
commit | c886be29ee7383b18e3a2406c05e85df4d6960a6 (patch) | |
tree | 72284dfc58a9a1e9fc1a0518b2f1accd9912a4cc /src/map/unit.c | |
parent | 5731ba51f3620d02e56b26e03daaf711c40145c2 (diff) | |
download | hercules-c886be29ee7383b18e3a2406c05e85df4d6960a6.tar.gz hercules-c886be29ee7383b18e3a2406c05e85df4d6960a6.tar.bz2 hercules-c886be29ee7383b18e3a2406c05e85df4d6960a6.tar.xz hercules-c886be29ee7383b18e3a2406c05e85df4d6960a6.zip |
Fixed bug with attack timer being chained unnecessarily when attacker is not able to issue atk -- this also caused client messages to be spammed e.g. "please equip arrow first". bugreport:5189
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15443 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 5e0d5527f..e4376b01d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1759,7 +1759,13 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t if(sd && sd->status.pet_id > 0 && sd->pd && battle_config.pet_attack_support) pet_target_check(sd,target,0); map_freeblock_unlock(); - + /** + * Applied when you're unable to attack (e.g. out of ammo) + * We should stop here otherwise timer keeps on and this happens endlessly + **/ + if( ud->attacktarget_lv == ATK_NONE ) + return 1; + ud->attackabletime = tick + sstatus->adelay; // You can't move if you can't attack neither. if (src->type&battle_config.attack_walk_delay) |