diff --git a/src/main/java/emu/grasscutter/game/inventory/Inventory.java b/src/main/java/emu/grasscutter/game/inventory/Inventory.java index e72bd3eed..14d1ae203 100644 --- a/src/main/java/emu/grasscutter/game/inventory/Inventory.java +++ b/src/main/java/emu/grasscutter/game/inventory/Inventory.java @@ -164,6 +164,9 @@ public class Inventory implements Iterable { if (tab.getSize() >= tab.getMaxCapacity()) { return null; } + // Duplicates cause problems + item.setCount(Math.max(item.getCount(), 1)); + // Adds to inventory putItem(item, tab); } else if (type == ItemType.ITEM_VIRTUAL) { // Handle @@ -288,7 +291,11 @@ public class Inventory implements Iterable { return false; } - item.setCount(item.getCount() - count); + if (item.getItemData().isEquip()) { + item.setCount(0); + } else { + item.setCount(item.getCount() - count); + } if (item.getCount() <= 0) { // Remove from inventory tab too