From a4cab3565a90c3d3f23cb7b12f6da420ffbd8545 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 2 Sep 2023 13:16:34 -0400 Subject: [PATCH] Value cannot be null. Set early in runafterload. --- src/engine/objects/Mob.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index b25910e4..17e257dd 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -560,14 +560,15 @@ public class Mob extends AbstractIntelligenceAgent { return null; Mob mob = (Mob) DbManager.getFromCache(GameObjectType.Mob, id); + if (mob != null) return mob; + return DbManager.MobQueries.GET_MOB(id); } public static Mob getFromCache(int id) { - return (Mob) DbManager.getFromCache(GameObjectType.Mob, id); } @@ -671,11 +672,8 @@ public class Mob extends AbstractIntelligenceAgent { if (this.agentType.equals(AIAgentType.GUARDMINION)) return this.guardCaptain.contract.getMobbaseID(); - - if (this.mobBase != null) + else return this.mobBase.getObjectUUID(); - - return 0; } public Vector3fImmutable getTrueBindLoc() {