Browse Source

refund gold for cancelled rolled items

lakebane-strongholds
FatBoy-DOTC 3 months ago
parent
commit
16be9b9dae
  1. 5
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

5
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -360,6 +360,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
targetItem.recycle(vendor); targetItem.recycle(vendor);
vendor.removeItemFromForge(targetItem); 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 // Refresh vendor's inventory to client
outMsg = new ManageNPCMsg(vendor); outMsg = new ManageNPCMsg(vendor);

Loading…
Cancel
Save