From c43c3de18ab4cd857617e6fc57447c900f7e3975 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 30 Apr 2024 21:08:22 -0500 Subject: [PATCH] zone loading --- src/engine/server/world/WorldServer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index f1c6d4f6..7370221b 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -656,9 +656,13 @@ public class WorldServer { npcs = DbManager.NPCQueries.GET_ALL_NPCS_FOR_ZONE(zone); for (NPC n : npcs) { + + if(n == null) + continue; + n.setObjectTypeMask(MBServerStatics.MASK_NPC); - if(n.contract.getContractID() == 1200) { + if(n.contract != null && n.contract.getContractID() == 1200) { DbManager.NPCQueries.DELETE_NPC(n); continue; }