From e1ba01caf65fe926ec910ec202585ce67ccb3b56 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 21 Jun 2021 19:50:33 -0400 Subject: [PATCH] v0.9.3c: fixed quick use window working when hero is dead --- .../shatteredpixeldungeon/windows/WndQuickBag.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuickBag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuickBag.java index 0adbd9976..69539405a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuickBag.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndQuickBag.java @@ -215,8 +215,13 @@ public class WndQuickBag extends Window { @Override protected void onClick() { + if (Dungeon.hero == null || !Dungeon.hero.isAlive()){ + Game.scene().addToFront(new WndUseItem(WndQuickBag.this, item)); + return; + } + hide(); - item.execute(Dungeon.hero); //TODO targeting? + item.execute(Dungeon.hero); if (item.usesTargeting && bag != null){ int idx = Dungeon.quickslot.getSlot(WndQuickBag.bag); if (idx != -1){