From 39305d63c7edf46329e164bca23e17a503da30aa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 6 Jul 2024 20:08:09 -0500 Subject: [PATCH] noob island gear --- src/engine/net/client/ClientMessagePump.java | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index 3c1158d3..5409d133 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -564,23 +564,26 @@ public class ClientMessagePump implements NetMsgHandler { if(i.getItemBaseID() == 7) return; - if (i.isCanDestroy()) - if (itemManager.delete(i)) { - int goldValue = i.getBaseValue(); - if(i.getItemBase().isRune()) - goldValue = 500000; + if (i.isCanDestroy()) { + int goldValue = i.getBaseValue(); + if (i.getItemBase().isRune()) + goldValue = 500000; + + if (i.getItemBaseID() == 980066) + goldValue = 0; - if(i.getItemBaseID() == 980066) - goldValue = 0; + if(itemManager.getGoldInventory().getNumOfItems() + goldValue > 10000000) + return; - if(goldValue > 0) - itemManager.addGoldToInventory(goldValue,false); + if (itemManager.delete(i)) { + if (goldValue > 0) + itemManager.addGoldToInventory(goldValue, false); itemManager.updateInventory(); Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); } - + } } private static void ackBankWindowOpened(AckBankWindowOpenedMsg msg, ClientConnection origin) {