|
|
|
@ -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; |
|
|
|
|