From e6af00f833018a45e09c95e3ec722b59431697e2 Mon Sep 17 00:00:00 2001
From: Zoey76 <zoey_76@msn.com>
Date: Fri, 27 Dec 2019 21:25:19 -0300
Subject: [PATCH] Check whether target has AI on Get Aggro effect

Contributor: ShinichiYao
---
 .../datapack/handlers/effecthandlers/instant/GetAgro.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/com/l2jserver/datapack/handlers/effecthandlers/instant/GetAgro.java b/src/main/java/com/l2jserver/datapack/handlers/effecthandlers/instant/GetAgro.java
index 56e1b1995a..b95bdc476d 100644
--- a/src/main/java/com/l2jserver/datapack/handlers/effecthandlers/instant/GetAgro.java
+++ b/src/main/java/com/l2jserver/datapack/handlers/effecthandlers/instant/GetAgro.java
@@ -52,7 +52,7 @@ public final class GetAgro extends AbstractEffect
 	@Override
 	public void onStart(BuffInfo info)
 	{
-		if (info.getEffected() instanceof L2Attackable)
+		if ((info.getEffected() instanceof L2Attackable) && info.getEffected().hasAI() && (((L2Attackable) info.getEffected()).getMostHated() != info.getEffector()))
 		{
 			info.getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, info.getEffector());
 		}
-- 
GitLab