Browse Source

Patrol points inherited from barracks not captain.

feature-workorder
MagicBot 1 year ago
parent
commit
8151382a6b
  1. 19
      src/engine/mobileAI/MobAI.java

19
src/engine/mobileAI/MobAI.java

@ -263,7 +263,7 @@ public class MobAI {
//guard captains inherit barracks patrol points dynamically //guard captains inherit barracks patrol points dynamically
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) { if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN) || mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) {
Building barracks = mob.building; Building barracks = mob.building;
@ -283,23 +283,6 @@ public class MobAI {
MovementUtilities.aiMove(mob, mob.destination, true); MovementUtilities.aiMove(mob, mob.destination, true);
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN))
for (Integer minionUUUD : mob.minions) {
Mob minion = Mob.getMob(minionUUUD);
//make sure mob is out of combat stance
if (minion.despawned == false) {
if (MovementUtilities.canMove(minion)) {
Vector3f minionOffset = Formation.getOffset(2, mob.minions.indexOf(minionUUUD) + 3);
minion.updateLocation();
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z);
MovementUtilities.aiMove(minion, formationPatrolPoint, true);
}
}
}
} catch (Exception e) { } catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackTarget" + " " + e.getMessage()); Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackTarget" + " " + e.getMessage());
} }

Loading…
Cancel
Save