From d058e7506a77dbfeb3aa3680e33d050e1bf9f64b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 9 Mar 2024 19:19:58 -0600 Subject: [PATCH] resource stacking bug --- src/engine/objects/CharacterItemManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 2905431f..bcd9fe09 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -1280,8 +1280,11 @@ public class CharacterItemManager { if (ib != null) this.inventoryWeight += ib.getWeight(); } else{ - this.inventory.removeAll(purge); i.setNumOfItems(count); + for(Item item : purge){ + this.delete(item); + } + this.inventory.removeAll(purge); this.inventory.add(i); } this.updateInventory();