From c0a50544d785e176351c710e6f89f81338f3cabc Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 25 Mar 2024 06:35:45 -0400 Subject: [PATCH] Value is only an override --- src/engine/objects/CharacterItemManager.java | 5 ++--- src/engine/objects/Item.java | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 0bd2fa07..421067ff 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -1483,11 +1483,10 @@ public class CharacterItemManager { return false; // Reset value + purchasedItem.value = (int) (purchasedItem.template.item_value * (purchasedItem.combat_health_current / purchasedItem.template.combat_health_full)); - purchasedItem.value = purchasedItem.value * (purchasedItem.chargesRemaining / purchasedItem.template.item_initial_charges); - DbManager.ItemQueries.UPDATE_VALUE(purchasedItem, purchasedItem.value); - // db transfer successfull, remove from this character + // db transfer successfully, remove from this character // skip this check if this is a mobLoot item (which is not in any inventory) if (!itemMan.removeItemFromInventory(purchasedItem)) return false; diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index 2fde1d9e..89f38a85 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -781,8 +781,6 @@ public class Item extends AbstractWorldObject { if (this.chargesRemaining < 0) this.chargesRemaining = 0; DbManager.ItemQueries.UPDATE_REMAINING_CHARGES(this); - this.value = this.template.item_value * (this.chargesRemaining / this.template.item_initial_charges); - DbManager.ItemQueries.UPDATE_VALUE(this, this.value); } public void zeroItem() {