From 7f6fbd2bff4c5b6a36831cc58e273a181c3db04c Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 24 Jan 2024 19:03:33 -0600 Subject: [PATCH] load mesh data and structure meshes --- src/engine/mobileAI/MobAI.java | 6 +++--- src/engine/objects/Mob.java | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 1f233837..6d37e96e 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -939,16 +939,16 @@ public class MobAI { //dont scan self. - if (mob.equals(awoMob) || (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) == true) + if (mob.equals(awoMob)) continue; Mob aggroMob = (Mob) awoMob; //don't attack other guards - - if ((aggroMob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN))) + if (aggroMob.isGuard() == true) continue; + //don't attack pets if (aggroMob.agentType.equals(Enum.AIAgentType.PET)) continue; diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 27f7d641..7ee7c33f 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1889,6 +1889,19 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { } } + public Boolean isGuard(){ + + switch(this.behaviourType){ + case GuardMinion: + case GuardCaptain: + case GuardWallArcher: + case HamletGuard: + case SimpleStandingGuard: + return true; + } + return false; + } + @Override public long getDelay(@NotNull TimeUnit unit) { long timeRemaining = this.respawnTime - System.currentTimeMillis();