aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-28 09:28:10 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-28 09:28:10 +0200
commit5baba39ff026fe777362ffece92b1a56395df396 (patch)
tree37fc3bbda570e34e0b2247dc1da24c55f8eb4a9d /src/main
parent8477760bfe6bf004ad553396b4a1b6786ceb1127 (diff)
downloadskyhanni-5baba39ff026fe777362ffece92b1a56395df396.tar.gz
skyhanni-5baba39ff026fe777362ffece92b1a56395df396.tar.bz2
skyhanni-5baba39ff026fe777362ffece92b1a56395df396.zip
code cleanup
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt4
2 files changed, 3 insertions, 2 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 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<String>): 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")