From 291cb97a2207dfeb9e7c134b428c9f74d8ce9836 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 21 Aug 2023 13:34:42 -0400 Subject: [PATCH] New npc creation work. --- src/engine/objects/NPC.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index c7ce36c7..36e2af75 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -470,7 +470,12 @@ public class NPC extends AbstractCharacter { newNPC.parentZoneID = parent.getObjectUUID(); newNPC.guildUUID = guild.getObjectUUID(); - newNPC.buildingUUID = building.getObjectUUID(); + + if (building == null) + newNPC.buildingUUID = 0; + else + newNPC.buildingUUID = building.getObjectUUID(); + newNPC.level = level; newNPC.buyPercent = .33f;