Browse Source

Miniond patrol on own if captain is dead.

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

19
src/engine/mobileAI/MobAI.java

@ -713,13 +713,13 @@ public class MobAI { @@ -713,13 +713,13 @@ public class MobAI {
if (mob.guardCaptain == null)
return;
if (!mob.playerAgroMap.containsKey(mob.guardCaptain.getObjectUUID())) {
//mob no longer has its owner loaded, translocate pet to owner
//mob no longer has its owner loaded, translate pet to owner
if (!mob.playerAgroMap.containsKey(mob.guardCaptain.getObjectUUID())) {
MovementManager.translocate(mob, mob.guardCaptain.getLoc(), null);
return;
}
if (mob.getCombatTarget() == null) {
//move back to owner
@ -734,9 +734,16 @@ public class MobAI { @@ -734,9 +734,16 @@ public class MobAI {
break;
default:
if (mob.getCombatTarget() == null) {
if (!mob.isMoving())
Patrol(mob);
else
if (!mob.isMoving()) {
// Minions only patrol on their own if captain is dead.
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION) == false)
Patrol(mob);
else if (mob.guardCaptain.isAlive() == false)
Patrol(mob);
} else
mob.stopPatrolTime = System.currentTimeMillis();
} else {
chaseTarget(mob);

Loading…
Cancel
Save