forked from MagicBane/Server
Miniond patrol on own if captain is dead.
This commit is contained in:
@@ -713,13 +713,13 @@ public class MobAI {
|
||||
if (mob.guardCaptain == null)
|
||||
return;
|
||||
|
||||
//mob no longer has its owner loaded, translate pet to owner
|
||||
|
||||
if (!mob.playerAgroMap.containsKey(mob.guardCaptain.getObjectUUID())) {
|
||||
|
||||
//mob no longer has its owner loaded, translocate pet to owner
|
||||
|
||||
MovementManager.translocate(mob, mob.guardCaptain.getLoc(), null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mob.getCombatTarget() == null) {
|
||||
|
||||
//move back to owner
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user