v3.1.0: fixed cases of metamorphed holy intuition deleting armor

This commit is contained in:
Evan Debenham
2025-05-20 13:36:45 -04:00
parent b19aae761f
commit 0db59e92cf
@@ -228,8 +228,6 @@ public class Armor extends EquipableItem {
@Override @Override
public boolean doEquip( Hero hero ) { public boolean doEquip( Hero hero ) {
detach(hero.belongings.backpack);
// 15/25% chance // 15/25% chance
if (hero.heroClass != HeroClass.CLERIC && hero.hasTalent(Talent.HOLY_INTUITION) if (hero.heroClass != HeroClass.CLERIC && hero.hasTalent(Talent.HOLY_INTUITION)
@@ -240,6 +238,8 @@ public class Armor extends EquipableItem {
return false; return false;
} }
detach(hero.belongings.backpack);
Armor oldArmor = hero.belongings.armor; Armor oldArmor = hero.belongings.armor;
if (hero.belongings.armor == null || hero.belongings.armor.doUnequip( hero, true, false )) { if (hero.belongings.armor == null || hero.belongings.armor.doUnequip( hero, true, false )) {