v0.2.4: refactored handling the quickslot when equipping.

This commit is contained in:
Evan Debenham
2015-02-12 15:28:10 -05:00
parent d94847af4c
commit e4cfe7586a
5 changed files with 8 additions and 17 deletions
@@ -92,13 +92,9 @@ public class Armor extends EquipableItem {
@Override
public boolean doEquip( Hero hero ) {
int slot = Dungeon.quickslot.getSlot( this );
detach( hero.belongings.backpack );
if (slot != -1) Dungeon.quickslot.setSlot( slot, this );
if (hero.belongings.armor == null || hero.belongings.armor.doUnequip( hero, true, false )) {
hero.belongings.armor = this;