浏览代码

Fixed issue with continuous attacks ignoring battle conditions, bugreport:987

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15396 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 年之前
父节点
当前提交
5a7cd478df
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/map/unit.c

+ 2 - 1
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 )