From 9c867ee281c357bdc4bad5fadf75c6129d3a1353 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Mar 2024 13:00:46 -0500 Subject: [PATCH] login crash bug --- src/engine/objects/CharacterItemManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/CharacterItemManager.java b/src/engine/objects/CharacterItemManager.java index 8afe99c3..3acec039 100644 --- a/src/engine/objects/CharacterItemManager.java +++ b/src/engine/objects/CharacterItemManager.java @@ -1262,12 +1262,13 @@ public class CharacterItemManager { if(item.getItemBaseID() == i.getItemBaseID()){ if(item.getNumOfItems() + count <= Warehouse.getMaxResources().get(i.getItemBaseID())){ purge.add(item); - count += item.getNumOfItems(); } } } for(Item item : purge){ + count += item.getNumOfItems(); this.removeItemFromInventory(item); + item.junk(); } Item resource = new MobLoot(this.getOwner(),i.getItemBase(),count,false).promoteToItem((PlayerCharacter)this.getOwner()); this.inventory.add(resource);