Browse Source

mob ai work

lakebane-mobai2
FatBoy-DOTC 1 week ago
parent
commit
789b3f3ffb
  1. 5
      src/engine/objects/Mob.java

5
src/engine/objects/Mob.java

@ -1443,10 +1443,10 @@ public class Mob extends AbstractIntelligenceAgent {
loadInventory(); loadInventory();
this.updateLocation(); this.updateLocation();
reloaddAgroMap(this); reloadAgroMap(this);
} }
private static void reloaddAgroMap(Mob mob){ private static void reloadAgroMap(Mob mob){
mob.playerAgroMap.clear(); mob.playerAgroMap.clear();
for(AbstractWorldObject obj : WorldGrid.getObjectsInRangePartial(mob.loc,MBServerStatics.CHARACTER_LOAD_RANGE,1)){ for(AbstractWorldObject obj : WorldGrid.getObjectsInRangePartial(mob.loc,MBServerStatics.CHARACTER_LOAD_RANGE,1)){
if(!mob.playerAgroMap.containsKey(obj.getObjectUUID())){ if(!mob.playerAgroMap.containsKey(obj.getObjectUUID())){
@ -1459,6 +1459,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.despawned = true; this.despawned = true;
this.stopPatrolTime = System.currentTimeMillis();
WorldGrid.RemoveWorldObject(this); WorldGrid.RemoveWorldObject(this);
this.charItemManager.clearInventory(); this.charItemManager.clearInventory();

Loading…
Cancel
Save