From 345a866f50ef75ba08b54db2e8677695073ee7be Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 6 Aug 2023 00:07:01 -0500 Subject: [PATCH] mele guards dont cast --- src/engine/mobileAI/MobAI.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 1fa9a1cf..66823709 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -322,14 +322,12 @@ public class MobAI { if(mob.isPlayerGuard == true){ int contractID; - if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){ + if(mob.BehaviourType.equals(Enum.MobBehaviourType.GuardMinion)) contractID = mob.npcOwner.contract.getContractID(); - } else{ + else contractID = mob.contract.getContractID(); - } - if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false){ + if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false) return false; - } } if (mob.mobPowers.isEmpty())