From 5baba39ff026fe777362ffece92b1a56395df396 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:28:10 +0200 Subject: code cleanup --- .../at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt | 1 - .../java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2') 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 fc0a315da..bc5380f81 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 @@ -288,7 +288,6 @@ object EstimatedItemValue { private fun addReforgeStone(stack: ItemStack, list: MutableList): Double { var rawReforgeName = stack.getReforgeName() ?: return 0.0 - if (rawReforgeName.equals("pitchin")) rawReforgeName = "pitchin_koi" // exception for ((rawInternalName, values) in Constants.REFORGESTONES.entrySet()) { val stoneJson = values.asJsonObject diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index 0dcc728c2..0a3478236 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -144,7 +144,9 @@ object SkyBlockItemModifierUtils { }.sortedBy { it.first } } - fun ItemStack.getReforgeName() = getAttributeString("modifier") + fun ItemStack.getReforgeName() = getAttributeString("modifier")?.let { + if (it == "pitchin") "pitchin_koi" else it + } fun ItemStack.isRecombobulated() = getAttributeBoolean("rarity_upgrades") -- cgit