From 83be9f4ec50a88e94ae42cfea8cb88b3411ecf25 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 8 Jan 2025 17:28:19 -0600 Subject: [PATCH] mob ai work --- src/engine/objects/Mob.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 7047081f..8924eb05 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1443,6 +1443,16 @@ public class Mob extends AbstractIntelligenceAgent { loadInventory(); this.updateLocation(); + reloaddAgroMap(this); + } + + private static void reloaddAgroMap(Mob mob){ + mob.playerAgroMap.clear(); + for(AbstractWorldObject obj : WorldGrid.getObjectsInRangePartial(mob.loc,MBServerStatics.CHARACTER_LOAD_RANGE,1)){ + if(!mob.playerAgroMap.containsKey(obj.getObjectUUID())){ + mob.playerAgroMap.put(obj.getObjectUUID(),false); + } + } } public void despawn() {