Browse Source

mob ai work

lakebane-mobai2
FatBoy-DOTC 1 week ago
parent
commit
83be9f4ec5
  1. 10
      src/engine/objects/Mob.java

10
src/engine/objects/Mob.java

@ -1443,6 +1443,16 @@ public class Mob extends AbstractIntelligenceAgent {
loadInventory(); loadInventory();
this.updateLocation(); 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() { public void despawn() {

Loading…
Cancel
Save