From 1c1578595fdaa185b9ee2f51c68b22a4103aa7a2 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 16 Feb 2025 17:08:48 -0600 Subject: [PATCH] mob AI aggro --- src/engine/mobileAI/MobAI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 080e1c45..81618321 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -736,10 +736,14 @@ public class MobAI { try { HashSet players = WorldGrid.getObjectsInRangePartial(aiAgent.loc,MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_PLAYER); - HashSet pets = WorldGrid.getObjectsInRangePartial(aiAgent.loc,MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_PET); + HashSet pets = WorldGrid.getObjectsInRangePartial(aiAgent.loc,MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_MOB); AbstractWorldObject closestTarget = null; for(AbstractWorldObject pet : pets){ + Mob petMob = (Mob)pet; + if(!petMob.isPet()) + continue; + if(closestTarget == null) { closestTarget = pet; continue;