v0.9.1c: improved blacksmith logic when upgraded item is equipped

This commit is contained in:
Evan Debenham 2021-01-11 18:35:15 -05:00
parent 9cf5e4d8a7
commit f9290df028

View File

@ -226,10 +226,6 @@ public class Blacksmith extends NPC {
}
}
if (first.isEquipped( Dungeon.hero )) {
((EquipableItem)first).doUnequip( Dungeon.hero, true );
}
//preserves enchant/glyphs if present
if (first instanceof Weapon && ((Weapon) first).hasGoodEnchant()){
((Weapon) first).upgrade(true);
@ -238,11 +234,6 @@ public class Blacksmith extends NPC {
} else {
first.upgrade();
}
if (!Dungeon.hero.belongings.contains(first)) {
if (!first.collect()){
Dungeon.level.drop( first, Dungeon.hero.pos );
}
}
Dungeon.hero.spendAndNext( 2f );
Badges.validateItemLevelAquired( first );
Item.updateQuickslot();