mob ai work

This commit is contained in:
2025-01-08 17:28:19 -06:00
parent 728db63024
commit 83be9f4ec5
+10
View File
@@ -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() {