Browse Source

Revert value store

combat-2
MagicBot 8 months ago
parent
commit
0004215605
  1. 5
      src/engine/net/client/handlers/RepairMsgHandler.java
  2. 2
      src/engine/net/client/handlers/VendorSellMsgHandler.java

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

@ -140,11 +140,6 @@ public class RepairMsgHandler extends AbstractClientMsgHandler {
if (!DbManager.ItemQueries.SET_DURABILITY(toRepair, max)) if (!DbManager.ItemQueries.SET_DURABILITY(toRepair, max))
return true; 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 //repair the item
toRepair.setCombat_health_current(max); toRepair.setCombat_health_current(max);

2
src/engine/net/client/handlers/VendorSellMsgHandler.java

@ -105,7 +105,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
//get goldItem cost to sell //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 bargain = player.getBargain();
float profit = npc.getBuyPercent(player) + bargain; float profit = npc.getBuyPercent(player) + bargain;

Loading…
Cancel
Save