From 23e0a0dcc72cb466dd6d9c0c5081f454191c8f4c Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Mar 2024 16:34:10 -0500 Subject: [PATCH] mob aggro --- src/engine/mobileAI/MobAI.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index f9f2d651..7a2ee6fb 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -243,6 +243,7 @@ public class MobAI { target.setCombatTarget(mob); } } + target.setCombatTarget(mob); } catch (Exception e) { Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackMob" + " " + e.getMessage()); } @@ -1367,6 +1368,9 @@ public class MobAI { try { float CurrentHateValue = 0; + if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.Mob)){ + return mob.getCombatTarget(); + } if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) CurrentHateValue = mob.playerAgroMap.get(mob.combatTarget.getObjectUUID()).floatValue();