From 3c2d3782c2530c6ec60b379aaaf6e4e5b5cf31ef Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 14 Feb 2024 20:26:29 -0600 Subject: [PATCH] inventory junking --- src/engine/net/client/ClientMessagePump.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index c5815532..919a4a1c 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -560,15 +560,15 @@ public class ClientMessagePump implements NetMsgHandler { if (!itemManager.inventoryContains(i)) return; - if (i.isCanDestroy()) + if (i.isCanDestroy()) { if (itemManager.delete(i) == true) { - Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg); - DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); int value = i.getItemBase().getBaseValue(); if(sourcePlayer.getCharItemManager().getGoldInventory().getNumOfItems() + value <= 10000000) - sourcePlayer.getCharItemManager().addGoldToInventory(value,false); + sourcePlayer.getCharItemManager().addGoldToInventory(value,true); + Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg); + DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); } - + } } private static void ackBankWindowOpened(AckBankWindowOpenedMsg msg, ClientConnection origin) {