From 10b9445f4c78fea321905471967e06368611d122 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 25 Aug 2020 15:04:57 -0400 Subject: [PATCH] v0.8.2c: added a check to prevent collecting items with no quantity --- .../com/shatteredpixel/shatteredpixeldungeon/items/Item.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index 43238d739..bf55717e3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -169,6 +169,10 @@ public class Item implements Bundlable { public boolean collect( Bag container ) { + if (quantity <= 0){ + return true; + } + ArrayList items = container.items; for (Item item:items) {