From 28b0fd6fd4d51d46ff03b33d07b3ca3c7bf01960 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 25 Mar 2024 05:21:59 -0400 Subject: [PATCH] Removed two variables --- src/engine/net/client/handlers/VendorSellMsgHandler.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/engine/net/client/handlers/VendorSellMsgHandler.java b/src/engine/net/client/handlers/VendorSellMsgHandler.java index 0fda1216..6332ca98 100644 --- a/src/engine/net/client/handlers/VendorSellMsgHandler.java +++ b/src/engine/net/client/handlers/VendorSellMsgHandler.java @@ -105,22 +105,18 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler { //get goldItem cost to sell - cost = sell.template.item_value; //apply damaged value reduction - float durabilityCurrent = (short) sell.durabilityCurrent; - float durabilityMax = sell.template.item_health_full; - float damagedModifier = durabilityCurrent / durabilityMax; + float damagedModifier = sell.durabilityCurrent / sell.template.item_health_full; cost *= damagedModifier; - float bargain = player.getBargain(); + float bargain = player.getBargain(); float profit = npc.getBuyPercent(player) + bargain; if (profit > 1) profit = 1; - cost *= profit; if (gold.getNumOfItems() + cost > 10000000)