v2.5.0: fixed enchant/glyph cleansing resulting in crashes
This commit is contained in:
@@ -635,7 +635,7 @@ public class Armor extends EquipableItem {
|
||||
if (seal != null){
|
||||
seal.setGlyph(glyph);
|
||||
}
|
||||
if (isIdentified() && Dungeon.hero != null
|
||||
if (glyph != null && isIdentified() && Dungeon.hero != null
|
||||
&& Dungeon.hero.isAlive() && Dungeon.hero.belongings.contains(this)){
|
||||
Catalog.setSeen(glyph.getClass());
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ abstract public class Weapon extends KindOfWeapon {
|
||||
if (ench == null || !ench.curse()) curseInfusionBonus = false;
|
||||
enchantment = ench;
|
||||
updateQuickslot();
|
||||
if (isIdentified() && Dungeon.hero != null
|
||||
if (ench != null && isIdentified() && Dungeon.hero != null
|
||||
&& Dungeon.hero.isAlive() && Dungeon.hero.belongings.contains(this)){
|
||||
Catalog.setSeen(ench.getClass());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user