diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-28 18:04:34 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-28 18:04:34 +0100 |
commit | 0dd709b35f05359c48650ea8fc83f6c2479e56d8 (patch) | |
tree | d8368638a9f12d011d914513fe9874690c54b1ee /src/main | |
parent | bc8490f91db364b15bb2f7f9e83a5040bdac8acd (diff) | |
download | skyhanni-0dd709b35f05359c48650ea8fc83f6c2479e56d8.tar.gz skyhanni-0dd709b35f05359c48650ea8fc83f6c2479e56d8.tar.bz2 skyhanni-0dd709b35f05359c48650ea8fc83f6c2479e56d8.zip |
Fixed rune price calculation in Chest Value.
Diffstat (limited to 'src/main')
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;") } |