From 17e312bc7dd248b4cdfc7bcb2128678690f13f09 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 19 Apr 2021 19:15:37 -0400 Subject: [PATCH] v0.9.3: fixed Talent.onItemCollected not triggering in all cases --- .../com/shatteredpixel/shatteredpixeldungeon/items/Item.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index 4ed1435a9..4c3cc72e9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -113,7 +113,6 @@ public class Item implements Bundlable { GameScene.pickUp( this, hero.pos ); Sample.INSTANCE.play( Assets.Sounds.ITEM ); - Talent.onItemCollected( hero, this ); hero.spendAndNext( TIME_TO_PICK_UP ); return true; @@ -206,6 +205,7 @@ public class Item implements Bundlable { if (isSimilar( item )) { item.merge( this ); item.updateQuickslot(); + Talent.onItemCollected( Dungeon.hero, item ); return true; } } @@ -213,6 +213,7 @@ public class Item implements Bundlable { if (Dungeon.hero != null && Dungeon.hero.isAlive()) { Badges.validateItemLevelAquired( this ); + Talent.onItemCollected( Dungeon.hero, this ); } items.add( this );