소스 검색

Fixed HitTask continue actions if get status

Maneco2 3 년 전
부모
커밋
6de2a7906b
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java

+ 5 - 0
src/main/java/com/l2jserver/gameserver/model/actor/L2Character.java

@@ -4006,6 +4006,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 			return;
 		}
 		
+		if (isStunned() || isSleeping() || isAfraid() || isPhysicalAttackMuted()) {
+			getAI().notifyEvent(CtrlEvent.EVT_CANCEL);
+			return;
+		}
+		
 		if ((isNpc() && target.isAlikeDead()) || target.isDead() || (!getKnownList().knowsObject(target) && !isDoor())) {
 			// getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, null);
 			// Some times attack is processed but target die before the hit