diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index f21c44dc..dddb73d7 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -56,7 +56,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { else targetItem = null; - if (targetItem == null) return; @@ -88,10 +87,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { dispatch = Dispatch.borrow(player, outMsg); DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); } - - // Set item's price - - } // Method sets the price on an item in the vendor inventory @@ -119,7 +114,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { return; if (!vendor.charItemManager.hasRoomInventory(targetItem.template.item_wt)) { - ErrorPopupMsg.sendErrorPopup(player, 21); return; } @@ -146,7 +140,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { return; } - outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT.ordinal(), true); dispatch = Dispatch.borrow(player, outMsg); DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); @@ -161,59 +154,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { } finally { origin.sellLock.unlock(); } - } - - } - - // Method adds an item from the players inventory to the vendor. - - private static void completeItem(int itemUUID, NPC vendor, ClientConnection origin, ItemProductionMsg msg) { - - Item targetItem; - ManageNPCMsg outMsg; - Dispatch dispatch; - - PlayerCharacter player = origin.getPlayerCharacter(); - - if (player == null) - return; - - if (origin.buyLock.tryLock()) { - try { - targetItem = Item.getFromCache(itemUUID); - - if (targetItem == null) - return; - - - if (!vendor.charItemManager.forgeContains(targetItem, vendor)) - return; - - boolean worked = DbManager.ItemQueries.UPDATE_FORGE_TO_INVENTORY(targetItem); - if (!worked) { - Guild guild = vendor.getGuild(); - if (guild == null) - return; - //ChatManager.chatGuildInfo(guild, "Failed to complete Item " + targetItem.getName()); - return; - } - - targetItem.containerType = mbEnums.ItemContainerType.INVENTORY; - targetItem.setOwner(vendor); - vendor.charItemManager.addItemToInventory(targetItem); - - vendor.removeItemFromForge(targetItem); - - outMsg = new ManageNPCMsg(vendor); - outMsg.setMessageType(mbEnums.ProductionActionType.PRODUCE.ordinal()); - dispatch = Dispatch.borrow(player, outMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); - } finally { - origin.buyLock.unlock(); - } - } } // Method completes an item that has been previously rolled @@ -224,7 +166,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { Item targetItem; ItemProductionMsg outMsg; int totalValue = 0; - int currentStrongbox; Dispatch dispatch; if (vendor.getBuilding() == null)