aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <nea@nea.moe>2023-07-19 20:46:24 +0200
committerGitHub <noreply@github.com>2023-07-19 20:46:24 +0200
commit9aa8cd659bb1cefafda498f0684f9971aa0c8c94 (patch)
tree784f413f4b5f78286e41f9755cfb5c0945b76198 /src/main
parent6e5dce138d0c3cef5a2b79fab453aa6a712c0c7c (diff)
downloadskyhanni-9aa8cd659bb1cefafda498f0684f9971aa0c8c94.tar.gz
skyhanni-9aa8cd659bb1cefafda498f0684f9971aa0c8c94.tar.bz2
skyhanni-9aa8cd659bb1cefafda498f0684f9971aa0c8c94.zip
Fix individual attribute prices (#316)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt2
1 files changed, 1 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 3cca7d132..743cef9c8 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
@@ -233,7 +233,7 @@ object EstimatedItemValue {
private fun getPriceOrCompositePriceForAttribute(attributeName: String, level: Int): Double? {
return (1..10).mapNotNull { lowerLevel ->
NEUItems.getPriceOrNull("$attributeName;$lowerLevel")
- ?.let { it * (1 shl lowerLevel) / (1 shl level).toDouble() }
+ ?.let { it / (1 shl lowerLevel) * (1 shl level).toDouble() }
}.minOrNull()
}