From 2b927b1f74ce207df7d00c6f1f0a7d460ce62b05 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 12 Sep 2023 12:22:20 -0400 Subject: [PATCH] v2.2.0: converted inventory spells to use new consumption system --- .../shatteredpixeldungeon/items/spells/InventorySpell.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/InventorySpell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/InventorySpell.java index 3ad2d85af..cd8c2be77 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/InventorySpell.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/InventorySpell.java @@ -35,7 +35,6 @@ public abstract class InventorySpell extends Spell { @Override protected void onCast(Hero hero) { - curItem = detach( hero.belongings.backpack ); GameScene.selectItem( itemSelector ); } @@ -78,6 +77,8 @@ public abstract class InventorySpell extends Spell { } if (item != null) { + + curItem = detach(curUser.belongings.backpack); ((InventorySpell)curItem).onItemSelected( item ); curUser.spend( 1f ); @@ -87,8 +88,6 @@ public abstract class InventorySpell extends Spell { Sample.INSTANCE.play( Assets.Sounds.READ ); Invisibility.dispel(); - } else { - curItem.collect( curUser.belongings.backpack ); } } };