|
|
|
@ -166,7 +166,7 @@ public class MobAI {
@@ -166,7 +166,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
if (playercity != null) |
|
|
|
|
for (Mob guard : playercity.getParent().zoneMobSet) |
|
|
|
|
if (guard.behaviourType != null && guard.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain)) |
|
|
|
|
if (guard.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
|
if (guard.getCombatTarget() == null && !guard.getGuild().equals(mob.getGuild())) |
|
|
|
|
guard.setCombatTarget(mob); |
|
|
|
|
|
|
|
|
@ -261,7 +261,7 @@ public class MobAI {
@@ -261,7 +261,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
//guard captains inherit barracks patrol points dynamically
|
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain)) { |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) { |
|
|
|
|
|
|
|
|
|
Building barracks = mob.building; |
|
|
|
|
|
|
|
|
@ -281,7 +281,7 @@ public class MobAI {
@@ -281,7 +281,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
MovementUtilities.aiMove(mob, mob.destination, true); |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain)) |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
|
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) |
|
|
|
|
|
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
@ -313,7 +313,7 @@ public class MobAI {
@@ -313,7 +313,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
int contractID; |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardMinion)) |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
|
contractID = mob.guardCaptain.contract.getContractID(); |
|
|
|
|
else |
|
|
|
|
contractID = mob.contract.getContractID(); |
|
|
|
@ -615,7 +615,7 @@ public class MobAI {
@@ -615,7 +615,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
if (mob.despawned && mob.isPlayerGuard()) { |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardMinion)) { |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) { |
|
|
|
|
if (mob.guardCaptain.isAlive() == false || ((Mob) mob.guardCaptain).despawned == true) { |
|
|
|
|
|
|
|
|
|
//minions don't respawn while guard captain is dead
|
|
|
|
@ -632,7 +632,7 @@ public class MobAI {
@@ -632,7 +632,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
//check to send mob home for player guards to prevent exploit of dragging guards away and then teleporting
|
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.Pet1) == false) |
|
|
|
|
if (!mob.agentType.equals(Enum.AIAgentType.PET)) |
|
|
|
|
CheckToSendMobHome(mob); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
@ -653,7 +653,7 @@ public class MobAI {
@@ -653,7 +653,7 @@ public class MobAI {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.Pet1) == false) |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.PET) == false) |
|
|
|
|
CheckToSendMobHome(mob); |
|
|
|
|
|
|
|
|
|
if (mob.getCombatTarget() != null) { |
|
|
|
@ -908,7 +908,7 @@ public class MobAI {
@@ -908,7 +908,7 @@ public class MobAI {
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
if (mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter) mob.getCombatTarget()) == false && |
|
|
|
|
mob.behaviourType.equals(Enum.MobBehaviourType.Pet1) == false) { |
|
|
|
|
mob.agentType.equals(Enum.AIAgentType.PET) == false) { |
|
|
|
|
|
|
|
|
|
mob.setCombatTarget(null); |
|
|
|
|
return; |
|
|
|
@ -927,7 +927,7 @@ public class MobAI {
@@ -927,7 +927,7 @@ public class MobAI {
|
|
|
|
|
if (mob.behaviourType.isAgressive) { |
|
|
|
|
|
|
|
|
|
if (mob.isPlayerGuard()) { |
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain)) |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
|
CheckForPlayerGuardAggro(mob); |
|
|
|
|
} else { |
|
|
|
|
CheckForAggro(mob); |
|
|
|
@ -947,7 +947,7 @@ public class MobAI {
@@ -947,7 +947,7 @@ public class MobAI {
|
|
|
|
|
PowersManager.useMobPower(mob, mob, recall, 40); |
|
|
|
|
mob.setCombatTarget(null); |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain) && mob.isAlive()) { |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN) && mob.isAlive()) { |
|
|
|
|
|
|
|
|
|
//guard captain pulls his minions home with him
|
|
|
|
|
|
|
|
|
@ -1028,7 +1028,7 @@ public class MobAI {
@@ -1028,7 +1028,7 @@ public class MobAI {
|
|
|
|
|
if ((aggroMob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN))) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
if (aggroMob.behaviourType.equals(Enum.MobBehaviourType.Pet1)) |
|
|
|
|
if (aggroMob.agentType.equals(Enum.AIAgentType.PET)) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
if (mob.getLoc().distanceSquared2D(aggroMob.getLoc()) > sqr(50)) |
|
|
|
@ -1259,7 +1259,7 @@ public class MobAI {
@@ -1259,7 +1259,7 @@ public class MobAI {
|
|
|
|
|
if (mob.getGuild().getNation().equals(target.getGuild().getNation())) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardMinion)) { |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) { |
|
|
|
|
if (((Mob) mob.guardCaptain).building.getCity().cityOutlaws.contains(target.getObjectUUID()) == true) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -1344,7 +1344,7 @@ public class MobAI {
@@ -1344,7 +1344,7 @@ public class MobAI {
|
|
|
|
|
|
|
|
|
|
MovementUtilities.aiMove(mob, mob.destination, true); |
|
|
|
|
|
|
|
|
|
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain)) { |
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) { |
|
|
|
|
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) { |
|
|
|
|
|
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
|