From 3c23a070dfb981f794268d1b0cff0a9e08b622ab Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 8 Jun 2024 19:03:11 -0500 Subject: [PATCH] glass repairable for 3x base repair costs --- src/engine/net/client/ClientMessagePump.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/net/client/ClientMessagePump.java b/src/engine/net/client/ClientMessagePump.java index a7864bcb..1f7659bf 100644 --- a/src/engine/net/client/ClientMessagePump.java +++ b/src/engine/net/client/ClientMessagePump.java @@ -1660,8 +1660,8 @@ public class ClientMessagePump implements NetMsgHandler { if (toRepair == null) return; - if (toRepair.getItemBase().isGlass()) - return; + //if (toRepair.getItemBase().isGlass()) + // return; //make sure item is in player's inventory or equipment if (!itemMan.inventoryContains(toRepair) && !itemMan.equippedContains(toRepair)) @@ -1683,6 +1683,12 @@ public class ClientMessagePump implements NetMsgHandler { } //TODO get cost to repair int cost = (int) ((max - dur) * 80.1); + + //glass costs 3x as much to repair + if (toRepair.getItemBase().isGlass()){ + cost *= 3; + } + Building b = (!npc.isStatic()) ? npc.getBuilding() : null; if (b != null)