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;