From 99221d1f6d31eefaf51f5003e6ea5e29e910611c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 11 Dec 2024 18:55:55 -0500 Subject: [PATCH] v3.0.0: fixed recently used item track not being renamed as intended --- .../shatteredpixeldungeon/actors/hero/Talent.java | 4 ++-- .../actors/hero/spells/RecallInscription.java | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 9dc51456a..c42e93265 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -724,7 +724,7 @@ public enum Talent { && hero.hasTalent(RECALL_INSCRIPTION) && Scroll.class.isAssignableFrom(cls) && cls != ScrollOfUpgrade.class){ - Buff.prolong(hero, RecallInscription.UsedGlyphTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls; + Buff.prolong(hero, RecallInscription.UsedItemTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls; } } @@ -732,7 +732,7 @@ public enum Talent { if (hero.heroClass == HeroClass.CLERIC && hero.hasTalent(RECALL_INSCRIPTION) && Runestone.class.isAssignableFrom(cls)){ - Buff.prolong(hero, RecallInscription.UsedGlyphTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls; + Buff.prolong(hero, RecallInscription.UsedItemTracker.class, hero.pointsInTalent(RECALL_INSCRIPTION) == 2 ? 300 : 10).item = cls; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java index cde2bb007..6b0242d33 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/RecallInscription.java @@ -60,11 +60,11 @@ public class RecallInscription extends ClericSpell { @Override public void onCast(HolyTome tome, Hero hero) { - if (hero.buff(UsedGlyphTracker.class) == null){ + if (hero.buff(UsedItemTracker.class) == null){ return; } - Item item = Reflection.newInstance(hero.buff(UsedGlyphTracker.class).item); + Item item = Reflection.newInstance(hero.buff(UsedItemTracker.class).item); item.setCurrent(hero); @@ -84,14 +84,14 @@ public class RecallInscription extends ClericSpell { } onSpellCast(tome, hero); - hero.buff(UsedGlyphTracker.class).detach(); + hero.buff(UsedItemTracker.class).detach(); } @Override public float chargeUse(Hero hero) { - if (hero.buff(UsedGlyphTracker.class) != null){ - Class item = hero.buff(UsedGlyphTracker.class).item; + if (hero.buff(UsedItemTracker.class) != null){ + Class item = hero.buff(UsedItemTracker.class).item; if (ExoticScroll.class.isAssignableFrom(item)){ if (item == ScrollOfMetamorphosis.class || item == ScrollOfEnchantment.class){ return 8; @@ -117,10 +117,10 @@ public class RecallInscription extends ClericSpell { @Override public boolean canCast(Hero hero) { - return hero.buff(UsedGlyphTracker.class) != null; + return hero.buff(UsedItemTracker.class) != null; } - public static class UsedGlyphTracker extends FlavourBuff { + public static class UsedItemTracker extends FlavourBuff { { type = buffType.POSITIVE;