From 46dcf1a9050deb7bab8e834e91ae39e818ac507d Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 17 Aug 2024 09:29:31 +0200 Subject: Fix: Negative price for items with no NPC sell price (#2360) --- src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt index 57ff972e8..b12f3640e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt @@ -16,7 +16,7 @@ object ItemPriceUtils { fun NEUInternalName.getPrice( priceSource: ItemPriceSource = ItemPriceSource.BAZAAR_INSTANT_BUY, pastRecipes: List = emptyList(), - ) = getPriceOrNull(priceSource, pastRecipes) ?: -1.0 + ) = getPriceOrNull(priceSource, pastRecipes) ?: 0.0 fun NEUInternalName.getPriceOrNull( priceSource: ItemPriceSource = ItemPriceSource.BAZAAR_INSTANT_BUY, @@ -66,7 +66,7 @@ object ItemPriceUtils { .filter { it >= 0 } .minOrNull() - fun NEUInternalName.getNpcPrice(): Double = getNpcPriceOrNull() ?: -1.0 + fun NEUInternalName.getNpcPrice(): Double = getNpcPriceOrNull() ?: 0.0 fun NEUInternalName.getNpcPriceOrNull(): Double? { if (this == NEUInternalName.WISP_POTION) { -- cgit