aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-28 21:08:03 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-28 21:08:03 +0200
commit65b5c9b1f7f7bf351027fefd7a4cad685e6c4282 (patch)
tree65d0fc946bed91d1e1a71169537213204e0beb98 /src/main/java/at/hannibal2/skyhanni/features/misc
parenta9294aa6d25fffa43a73b8111b1fa395ffd20cf8 (diff)
downloadskyhanni-65b5c9b1f7f7bf351027fefd7a4cad685e6c4282.tar.gz
skyhanni-65b5c9b1f7f7bf351027fefd7a4cad685e6c4282.tar.bz2
skyhanni-65b5c9b1f7f7bf351027fefd7a4cad685e6c4282.zip
Fixed the attribute Vitality getting wrongly labelled as Mending on Attribute Shards.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt7
1 files changed, 4 insertions, 3 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 6300b0cfd..b92bc8f0a 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
@@ -249,7 +249,7 @@ object EstimatedItemValue {
if (price != null) {
list.add(
"§7Attribute §9${
- attributes[0].first.split("_").joinToString(" ") { it.firstLetterUppercase() }
+ attributes[0].first.fixMending().split("_").joinToString(" ") { it.firstLetterUppercase() }
} ${attributes[0].second}§7: (§6${NumberUtil.format(price)}§7)"
)
return price
@@ -272,8 +272,7 @@ object EstimatedItemValue {
if (price != null) {
subTotal += price
}
- var displayName = attr.first
- if (displayName == ("MENDING")) displayName = "VITALITY"
+ val displayName = attr.first.fixMending()
list.add(
" §9${
displayName.split("_").joinToString(" ") { it.firstLetterUppercase() }
@@ -283,6 +282,8 @@ object EstimatedItemValue {
return subTotal
}
+ private fun String.fixMending() = if (this == "MENDING") "VITALITY" else this
+
private fun getPriceOrCompositePriceForAttribute(attributeName: String, level: Int): Double? {
return (1..10).mapNotNull { lowerLevel ->
"$attributeName;$lowerLevel".asInternalName().getPriceOrNull()