From b3a24d0158fe522991f8a97113393e9bfeca56ab Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 28 Dec 2024 04:42:23 -0600 Subject: [PATCH] fixed bug with trebs spamming console --- src/engine/mobileAI/MobAI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 1f515bb4..cb141b68 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -176,7 +176,7 @@ public class MobAI { if (playercity != null) for (Mob guard : playercity.getParent().zoneMobSet) if (guard.BehaviourType != null && guard.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardCaptain.ordinal()) - if (guard.getCombatTarget() == null && !guard.getGuild().equals(mob.getGuild())) + if (guard.getCombatTarget() == null && guard.getGuild() != null && mob.getGuild() != null && !guard.getGuild().equals(mob.getGuild())) guard.setCombatTarget(mob); if (mob.isSiege())