From 9aa8cd659bb1cefafda498f0684f9971aa0c8c94 Mon Sep 17 00:00:00 2001 From: Roman / Linnea Gräf Date: Wed, 19 Jul 2023 20:46:24 +0200 Subject: Fix individual attribute prices (#316) --- .../at/hannibal2/skyhanni/features/misc/items/EstimatedItemValue.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc') 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() } -- cgit