From 00042156050421cbdc20ef4df21cb338bc82b417 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 25 Mar 2024 11:29:04 -0400 Subject: [PATCH] Revert value store --- src/engine/net/client/handlers/RepairMsgHandler.java | 5 ----- src/engine/net/client/handlers/VendorSellMsgHandler.java | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/engine/net/client/handlers/RepairMsgHandler.java b/src/engine/net/client/handlers/RepairMsgHandler.java index 16db2b43..66bd860f 100644 --- a/src/engine/net/client/handlers/RepairMsgHandler.java +++ b/src/engine/net/client/handlers/RepairMsgHandler.java @@ -140,11 +140,6 @@ public class RepairMsgHandler extends AbstractClientMsgHandler { if (!DbManager.ItemQueries.SET_DURABILITY(toRepair, max)) return true; - toRepair.value = (int) (toRepair.template.item_value * (toRepair.combat_health_current / toRepair.template.combat_health_full)); - - if (!DbManager.ItemQueries.UPDATE_VALUE(toRepair, toRepair.value)) - return true; - //repair the item toRepair.setCombat_health_current(max); diff --git a/src/engine/net/client/handlers/VendorSellMsgHandler.java b/src/engine/net/client/handlers/VendorSellMsgHandler.java index 6c9e5ebd..2b1d8145 100644 --- a/src/engine/net/client/handlers/VendorSellMsgHandler.java +++ b/src/engine/net/client/handlers/VendorSellMsgHandler.java @@ -105,7 +105,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler { //get goldItem cost to sell - cost = sell.value; + cost = (int) (sell.template.item_value * (sell.combat_health_current / sell.template.combat_health_full)); float bargain = player.getBargain(); float profit = npc.getBuyPercent(player) + bargain;