From b90ed51d4a57f05c14f02daf4ffc09c37a6bb2b7 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 10 Sep 2023 12:38:19 +0200 Subject: Safety check for getItemRarityOrCommon --- .../skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt index 63b32ebb4..3dc13f8d5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FortuneUpgrades.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.c import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.getItem import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old import at.hannibal2.skyhanni.utils.ItemUtils.getItemName -import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarity +import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrCommon import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NumberUtil.addSuffix import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getEnchantments @@ -254,7 +254,7 @@ object FortuneUpgrades { } ?: return FarmingFortuneDisplay.loadFortuneLineData(item, 0.0) - val increase = reforge[item.getItemRarity().id + 1, FarmingFortuneDisplay.reforgeFortune] ?: return + val increase = reforge[item.getItemRarityOrCommon().id + 1, FarmingFortuneDisplay.reforgeFortune] ?: return list.add( FortuneUpgrade("§7Recombobulate your ${item.displayName}", null, "RECOMBOBULATOR_3000", 1, increase) ) @@ -267,7 +267,7 @@ object FortuneUpgrades { copperPrice: Int? = null ) { FarmingFortuneDisplay.loadFortuneLineData(item, 0.0) - val increase = reforge[item.getItemRarity().id, FarmingFortuneDisplay.reforgeFortune] ?: return + val increase = reforge[item.getItemRarityOrCommon().id, FarmingFortuneDisplay.reforgeFortune] ?: return list.add( FortuneUpgrade( "§7Reforge your ${item.displayName} §7to ${reforge.reforgeName}", -- cgit