|
|
@ -252,13 +252,16 @@ public class MobAI { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
//make sure mob is out of combat stance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int patrolDelay = ThreadLocalRandom.current().nextInt((int) (MobAIThread.AI_PATROL_DIVISOR * 0.5f), MobAIThread.AI_PATROL_DIVISOR) + MobAIThread.AI_PATROL_DIVISOR; |
|
|
|
int patrolDelay = ThreadLocalRandom.current().nextInt((int) (MobAIThread.AI_PATROL_DIVISOR * 0.5f), MobAIThread.AI_PATROL_DIVISOR) + MobAIThread.AI_PATROL_DIVISOR; |
|
|
|
|
|
|
|
|
|
|
|
//early exit while waiting to patrol again
|
|
|
|
// early exit while waiting to patrol again.
|
|
|
|
|
|
|
|
// Minions are force marched if captain is alive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean forced = mob.agentType.equals(Enum.AIAgentType.GUARDMINION) && |
|
|
|
|
|
|
|
mob.guardCaptain.isAlive(); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.stopPatrolTime + (patrolDelay * 1000) > System.currentTimeMillis()) |
|
|
|
if (mob.stopPatrolTime + (patrolDelay * 1000) > System.currentTimeMillis()) |
|
|
|
|
|
|
|
if (!forced) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
//guards inherit barracks patrol points dynamically
|
|
|
|
//guards inherit barracks patrol points dynamically
|
|
|
|