From d95bc5c261b7c784e6fec2e63f8822fe2c282370 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 14 Apr 2024 15:30:10 -0400 Subject: [PATCH] Initialize all collections for npc --- src/engine/objects/NPC.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 7bca7160..5c22b4db 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -869,10 +869,12 @@ public class NPC extends AbstractCharacter { if (this.building != null) NPCManager.slotCharacterInBuilding(this); - // If NPC is a vendor create arraylist for forge + // If NPC is a vendor then configure ForgeManager support - if (this.contract.isTrainer() == false) + if (this.contract.isTrainer() == false) { ForgeManager.vendorItemLookup.computeIfAbsent(this, k -> new ArrayList<>()); // Forge lookup + ForgeManager.vendorWorkOrderLookup.computeIfAbsent(this, k -> new ArrayList<>()); + } this.symbol = this.contract.getIconID(); this.modTypeTable = this.contract.getNPCModTypeTable();