From 364b2ee5bdb8ff8a90380ce29ab719ddb5c8f825 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 22 Aug 2024 13:07:05 -0400 Subject: [PATCH] v2.5.0: weapons/armor setting enchants/glyphs as seen from rankings --- .../shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java | 2 +- .../shatteredpixeldungeon/items/weapon/Weapon.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java index c9a68bbaf..d1bb3596c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/Armor.java @@ -206,7 +206,7 @@ public class Armor extends EquipableItem { @Override public boolean collect(Bag container) { if(super.collect(container)){ - if (isIdentified() && glyph != null){ + if (Dungeon.hero != null && Dungeon.hero.isAlive() && isIdentified() && glyph != null){ Catalog.setSeen(glyph.getClass()); } return true; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java index d73e1e0f9..a02fa8e7a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java @@ -182,7 +182,7 @@ abstract public class Weapon extends KindOfWeapon { @Override public boolean collect(Bag container) { if(super.collect(container)){ - if (isIdentified() && enchantment != null){ + if (Dungeon.hero != null && Dungeon.hero.isAlive() && isIdentified() && enchantment != null){ Catalog.setSeen(enchantment.getClass()); } return true;