v0.9.3c: fixed quick use window working when hero is dead

This commit is contained in:
Evan Debenham 2021-06-21 19:50:33 -04:00
parent f71af34f0b
commit e1ba01caf6

View File

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