|
|
@ -1120,13 +1120,30 @@ public class MobAI { |
|
|
|
mob.setCombatTarget(loadedPlayer); |
|
|
|
mob.setCombatTarget(loadedPlayer); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (mob.getCombatTarget() == null) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//look for siege equipment to aggro if no players found to aggro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HashSet<AbstractWorldObject> awoList = WorldGrid.getObjectsInRangePartial(mob, MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_SIEGE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (AbstractWorldObject awoMob : awoList) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mob aggroMob = (Mob) awoMob; |
|
|
|
|
|
|
|
if(GuardCanAggro(mob,aggroMob)) { |
|
|
|
|
|
|
|
mob.setCombatTarget(aggroMob); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: CheckForPlayerGuardAggro" + e.getMessage()); |
|
|
|
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: CheckForPlayerGuardAggro" + e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Boolean GuardCanAggro(Mob mob, PlayerCharacter target) { |
|
|
|
public static Boolean GuardCanAggro(Mob mob, AbstractCharacter target) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|