From ed596a419fe84b34f6a478510d0f072e06f532eb Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 7 Feb 2025 11:26:20 -0500 Subject: [PATCH] v3.0.0: fixed a NPE in trinity's body form effect --- .../actors/hero/abilities/cleric/Trinity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java index 2d23ad941..408d69f20 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java @@ -122,6 +122,7 @@ public class Trinity extends ArmorAbility { @Override protected void onClick() { if (Dungeon.hero.belongings.weapon() != null && + ((Weapon)Dungeon.hero.belongings.weapon()).enchantment != null && ((Weapon)Dungeon.hero.belongings.weapon()).enchantment.getClass().equals(bodyForm.getClass())){ GLog.w(Messages.get(Trinity.class, "no_duplicate")); hide(); @@ -155,6 +156,7 @@ public class Trinity extends ArmorAbility { @Override protected void onClick() { if (Dungeon.hero.belongings.armor() != null && + Dungeon.hero.belongings.armor().glyph != null && (Dungeon.hero.belongings.armor()).glyph.getClass().equals(bodyForm.getClass())){ GLog.w(Messages.get(Trinity.class, "no_duplicate")); hide();