Browse Source

mob AI aggro

lakebane-reset
FatBoy-DOTC 2 months ago
parent
commit
1c1578595f
  1. 6
      src/engine/mobileAI/MobAI.java

6
src/engine/mobileAI/MobAI.java

@ -736,10 +736,14 @@ public class MobAI { @@ -736,10 +736,14 @@ public class MobAI {
try {
HashSet<AbstractWorldObject> players = WorldGrid.getObjectsInRangePartial(aiAgent.loc,MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_PLAYER);
HashSet<AbstractWorldObject> pets = WorldGrid.getObjectsInRangePartial(aiAgent.loc,MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_PET);
HashSet<AbstractWorldObject> pets = WorldGrid.getObjectsInRangePartial(aiAgent.loc,MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_MOB);
AbstractWorldObject closestTarget = null;
for(AbstractWorldObject pet : pets){
Mob petMob = (Mob)pet;
if(!petMob.isPet())
continue;
if(closestTarget == null) {
closestTarget = pet;
continue;

Loading…
Cancel
Save