From 57122e5b74dc001086a8e6aad465aa14ecc439c8 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 15 Mar 2024 10:53:58 -0400 Subject: [PATCH] More refactor out itembase --- src/engine/net/client/handlers/OrderNPCMsgHandler.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/engine/net/client/handlers/OrderNPCMsgHandler.java b/src/engine/net/client/handlers/OrderNPCMsgHandler.java index ccdb621b..d282700c 100644 --- a/src/engine/net/client/handlers/OrderNPCMsgHandler.java +++ b/src/engine/net/client/handlers/OrderNPCMsgHandler.java @@ -41,7 +41,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { PlayerCharacter player; Contract contract; CharacterItemManager itemMan; - ItemBase itemBase; Item item; player = SessionManager.getPlayerCharacter(origin); @@ -59,16 +58,9 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { BuildingManager.removeHireling(building, hireling); - itemBase = ItemBase.getItemBase(contract.getContractID()); - - if (itemBase == null) { - Logger.error("Could not find Contract for npc: " + hireling.getObjectUUID()); - return; - } - boolean itemWorked = false; - item = new Item(itemBase.getUUID()); + item = new Item(contract.getContractID()); item.ownerID = player.getObjectUUID(); item.ownerType = Enum.OwnerType.PlayerCharacter; item.chargesRemaining = (byte) hireling.getRank() - 1;