v0.9.3: fixed Talent.onItemCollected not triggering in all cases

This commit is contained in:
Evan Debenham 2021-04-19 19:15:37 -04:00
parent 8daaba99a3
commit 17e312bc7d

View File

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