From 16be9b9daedc1ee3c2e9c2cc2c87cecdb6a2b16d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 11 Sep 2024 19:21:13 -0500 Subject: [PATCH] refund gold for cancelled rolled items --- src/engine/net/client/handlers/ItemProductionMsgHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index 3134f939..d4d754e1 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -360,6 +360,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { targetItem.recycle(vendor); vendor.removeItemFromForge(targetItem); + //refund the gold for cancelled item + if(vendor.building.getStrongboxValue() + targetItem.getItemBase().getBaseValue() < 15000000){ + vendor.building.setStrongboxValue(vendor.building.getStrongboxValue() + targetItem.getItemBase().getBaseValue()); + } + // Refresh vendor's inventory to client outMsg = new ManageNPCMsg(vendor);