v0.4.2: added a safety check to wndbag

This commit is contained in:
Evan Debenham 2016-08-30 18:19:29 -04:00
parent c1167676b8
commit e067901f0d

View File

@ -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 );