summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-05 03:58:48 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-05 03:58:48 +0000
commit7133565dadb2a30dd38146aba345307795aadbca (patch)
tree9fccb9492de211743863198cb0ceccba21e507c0
parent50e22190fc9a611060489093c92bea39cfe9dd86 (diff)
downloadhercules-7133565dadb2a30dd38146aba345307795aadbca.tar.gz
hercules-7133565dadb2a30dd38146aba345307795aadbca.tar.bz2
hercules-7133565dadb2a30dd38146aba345307795aadbca.tar.xz
hercules-7133565dadb2a30dd38146aba345307795aadbca.zip
Fixed issue with continuous attacks ignoring battle conditions, bugreport:987
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15396 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/unit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 06d4dc291..85a1b89f9 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1660,7 +1660,8 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
if( src == NULL || src->prev == NULL || target==NULL || target->prev == NULL )
return 0;
- if( status_isdead(src) || status_isdead(target) || !status_check_skilluse(src, target, 0, 0) )
+ if( status_isdead(src) || status_isdead(target) ||
+ battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) )
return 0; // can't attack under these conditions
if( src->m != target->m )