From e7e32ca4eff4c5463a30a7a2c0d37f8ca2e14140 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 24 Mar 2024 10:01:43 -0400 Subject: [PATCH] Handlers created for bank interaction --- src/engine/net/client/ClientMessagePump.java | 63 -------------------- 1 file changed, 63 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 9bd4240d..df5d5ba5 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -11,7 +11,6 @@ package engine.net.client; import engine.Enum.DispatchChannel; import engine.Enum.GameObjectType; -import engine.Enum.ItemContainerType; import engine.InterestManagement.WorldGrid; import engine.exception.MsgSendException; import engine.gameManager.*; @@ -156,65 +155,6 @@ public class ClientMessagePump implements NetMsgHandler { DispatchMessage.dispatchMsgToInterestArea(pc, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, true); } - private static void transferItemFromBankToInventory(TransferItemFromBankMsg msg, ClientConnection origin) { - - PlayerCharacter player = origin.getPlayerCharacter(); - Dispatch dispatch; - - if (player == null) - return; - - if (!NPCManager.NPCVaultBankRangeCheck(player, origin, "bank")) - return; - - CharacterItemManager itemManager = player.charItemManager; - - if (itemManager == null) - return; - - int uuid = msg.getUUID(); - - Item item = itemManager.getItemByUUID(uuid); - - if (item == null) - return; - - //dupe check - // WTF Checking but not logging? - - if (!item.validForBank(origin, player, itemManager)) - return; - - if (item.containerType == ItemContainerType.BANK && itemManager.isBankOpen() == false) - return; - - if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) { - - if (!itemManager.moveGoldToInventory(item, msg.getNumItems())) - return; - - UpdateGoldMsg goldMes = new UpdateGoldMsg(player); - goldMes.configure(); - - dispatch = Dispatch.borrow(player, goldMes); - DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); - - return; - } - - // Not gold, process update here - - if (!itemManager.hasRoomInventory(item.template.item_wt)) - return; - - if (itemManager.moveItemToInventory(item) == false) - return; - - dispatch = Dispatch.borrow(player, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); - - } - private static void transferItemFromVaultToInventory(TransferItemFromVaultToInventoryMsg msg, ClientConnection origin) { PlayerCharacter player = origin.getPlayerCharacter(); @@ -1233,9 +1173,6 @@ public class ClientMessagePump implements NetMsgHandler { case SHOWCOMBATINFO: show((ShowMsg) msg, origin); break; - case TRANSFERITEMFROMBANK: - transferItemFromBankToInventory((TransferItemFromBankMsg) msg, origin); - break; case TRANSFERITEMFROMVAULTTOINVENTORY: transferItemFromVaultToInventory((TransferItemFromVaultToInventoryMsg) msg, origin); break;