From 34081e590333fa51ac5925f28b48eb122b041d2b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 26 Aug 2023 12:21:47 -0400 Subject: [PATCH] Ordinal comparison fix. --- src/engine/objects/Mob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 4a1b0f72..9eb1bc50 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1083,7 +1083,7 @@ public class Mob extends AbstractIntelligenceAgent { this.recalculateStats(); this.setHealth(this.healthMax); - if (this.building == null && this.guardCaptain != null && ((Mob) this.guardCaptain).behaviourType.ordinal() == MobBehaviourType.GuardCaptain.ordinal()) + if (this.building == null && this.guardCaptain != null && ((Mob) this.guardCaptain).behaviourType.equals(MobBehaviourType.GuardCaptain)) this.building = this.guardCaptain.building; else if (this.building != null) this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z);