|
|
@ -288,18 +288,22 @@ public class MobAI { |
|
|
|
MovementUtilities.aiMove(mob, mob.destination, true); |
|
|
|
MovementUtilities.aiMove(mob, mob.destination, true); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) |
|
|
|
for (Integer minionUUUD : mob.minions) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mob minion = Mob.getMob(minionUUUD); |
|
|
|
|
|
|
|
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
|
|
|
|
|
|
|
|
if (minion.getKey().despawned == false) { |
|
|
|
if (minion.despawned == false) { |
|
|
|
if (MovementUtilities.canMove(minion.getKey())) { |
|
|
|
if (MovementUtilities.canMove(minion)) { |
|
|
|
Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3); |
|
|
|
Vector3f minionOffset = Formation.getOffset(2, mob.minions.indexOf(minionUUUD) + 3); |
|
|
|
minion.getKey().updateLocation(); |
|
|
|
minion.updateLocation(); |
|
|
|
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z); |
|
|
|
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z); |
|
|
|
MovementUtilities.aiMove(minion.getKey(), formationPatrolPoint, true); |
|
|
|
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()); |
|
|
|
} |
|
|
|
} |
|
|
@ -987,9 +991,11 @@ public class MobAI { |
|
|
|
|
|
|
|
|
|
|
|
//guard captain pulls his minions home with him
|
|
|
|
//guard captain pulls his minions home with him
|
|
|
|
|
|
|
|
|
|
|
|
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) { |
|
|
|
for (Integer minionUUID : mob.minions) { |
|
|
|
PowersManager.useMobPower(minion.getKey(), minion.getKey(), recall, 40); |
|
|
|
Mob minion = Mob.getMob(minionUUID); |
|
|
|
minion.getKey().setCombatTarget(null); |
|
|
|
|
|
|
|
|
|
|
|
PowersManager.useMobPower(minion, minion, recall, 40); |
|
|
|
|
|
|
|
minion.setCombatTarget(null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1381,16 +1387,18 @@ public class MobAI { |
|
|
|
MovementUtilities.aiMove(mob, mob.destination, true); |
|
|
|
MovementUtilities.aiMove(mob, mob.destination, true); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) { |
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) { |
|
|
|
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) { |
|
|
|
for (Integer minionUUID : mob.minions) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mob minion = Mob.getMob(minionUUID); |
|
|
|
|
|
|
|
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
|
|
|
|
|
|
|
|
if (minion.getKey().despawned == false) { |
|
|
|
if (minion.despawned == false) { |
|
|
|
if (MovementUtilities.canMove(minion.getKey())) { |
|
|
|
if (MovementUtilities.canMove(minion)) { |
|
|
|
Vector3f minionOffset = Formation.getOffset(2, minion.getValue() + 3); |
|
|
|
Vector3f minionOffset = Formation.getOffset(2, mob.minions.indexOf(minionUUID) + 3); |
|
|
|
minion.getKey().updateLocation(); |
|
|
|
minion.updateLocation(); |
|
|
|
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z); |
|
|
|
Vector3fImmutable formationPatrolPoint = new Vector3fImmutable(mob.destination.x + minionOffset.x, mob.destination.y, mob.destination.z + minionOffset.z); |
|
|
|
MovementUtilities.aiMove(minion.getKey(), formationPatrolPoint, true); |
|
|
|
MovementUtilities.aiMove(minion, formationPatrolPoint, true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|