|
|
@ -713,13 +713,13 @@ public class MobAI { |
|
|
|
if (mob.guardCaptain == null) |
|
|
|
if (mob.guardCaptain == null) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (!mob.playerAgroMap.containsKey(mob.guardCaptain.getObjectUUID())) { |
|
|
|
//mob no longer has its owner loaded, translate pet to owner
|
|
|
|
|
|
|
|
|
|
|
|
//mob no longer has its owner loaded, translocate pet to owner
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!mob.playerAgroMap.containsKey(mob.guardCaptain.getObjectUUID())) { |
|
|
|
MovementManager.translocate(mob, mob.guardCaptain.getLoc(), null); |
|
|
|
MovementManager.translocate(mob, mob.guardCaptain.getLoc(), null); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (mob.getCombatTarget() == null) { |
|
|
|
if (mob.getCombatTarget() == null) { |
|
|
|
|
|
|
|
|
|
|
|
//move back to owner
|
|
|
|
//move back to owner
|
|
|
@ -734,9 +734,16 @@ public class MobAI { |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
if (mob.getCombatTarget() == null) { |
|
|
|
if (mob.getCombatTarget() == null) { |
|
|
|
if (!mob.isMoving()) |
|
|
|
|
|
|
|
Patrol(mob); |
|
|
|
if (!mob.isMoving()) { |
|
|
|
else |
|
|
|
|
|
|
|
|
|
|
|
// 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(); |
|
|
|
mob.stopPatrolTime = System.currentTimeMillis(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
chaseTarget(mob); |
|
|
|
chaseTarget(mob); |
|
|
|