diff options
3 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt index d3560d3c6..527dfe4fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt @@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.events.RenderItemTooltipEvent import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import at.hannibal2.skyhanni.utils.ItemUtils.isRune import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld import at.hannibal2.skyhanni.utils.LorenzUtils @@ -182,7 +183,7 @@ object EstimatedItemValue { // Blocks the dungeon map if (internalName.startsWith("MAP-")) return listOf() // Hides the rune item - if (internalName.contains("_RUNE;")) return listOf() + if (internalName.isRune()) return listOf() if (internalName.contains("UNIQUE_RUNE")) return listOf() if (internalName.contains("WISP_POTION")) return listOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt index 601413065..2ff799e77 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValueCalculator.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getItemName import at.hannibal2.skyhanni.utils.ItemUtils.getItemNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import at.hannibal2.skyhanni.utils.ItemUtils.isRune import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.ItemUtils.nameWithEnchantment import at.hannibal2.skyhanni.utils.LorenzRarity @@ -472,6 +473,7 @@ object EstimatedItemValueCalculator { } private fun addRune(stack: ItemStack, list: MutableList<String>): Double { + if (stack.getInternalName().isRune()) return 0.0 val internalName = stack.getRune() ?: return 0.0 val price = internalName.getPrice() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 3bc79dbf2..d2c9776b7 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -380,4 +380,6 @@ object ItemUtils { } return rarity } + + fun NEUInternalName.isRune(): Boolean = contains("_RUNE;") } |