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

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