From e067901f0d0b57e9f9713a6983f18fa51f159315 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 30 Aug 2016 18:19:29 -0400 Subject: [PATCH] v0.4.2: added a safety check to wndbag --- .../shatteredpixeldungeon/windows/WndBag.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java index 77f918ac4..c3da05c4f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java @@ -411,7 +411,11 @@ public class WndBag extends WndTabbed { @Override protected void onClick() { - if (listener != null) { + if (!lastBag.contains(item) && !item.isEquipped(Dungeon.hero)){ + + hide(); + + } else if (listener != null) { hide(); listener.onSelect( item );