mob ai work

This commit is contained in:
2025-01-08 17:32:25 -06:00
parent 83be9f4ec5
commit 789b3f3ffb
+3 -2
View File
@@ -1443,10 +1443,10 @@ public class Mob extends AbstractIntelligenceAgent {
loadInventory();
this.updateLocation();
reloaddAgroMap(this);
reloadAgroMap(this);
}
private static void reloaddAgroMap(Mob mob){
private static void reloadAgroMap(Mob mob){
mob.playerAgroMap.clear();
for(AbstractWorldObject obj : WorldGrid.getObjectsInRangePartial(mob.loc,MBServerStatics.CHARACTER_LOAD_RANGE,1)){
if(!mob.playerAgroMap.containsKey(obj.getObjectUUID())){
@@ -1459,6 +1459,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.despawned = true;
this.stopPatrolTime = System.currentTimeMillis();
WorldGrid.RemoveWorldObject(this);
this.charItemManager.clearInventory();