From 82f2a2c6ea8c4b552cc5e65e27c397308fcb8989 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:55:02 +0200 Subject: Fix: Kuudra Key Value (#2205) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 563fefb30..51a07c0b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -181,8 +181,9 @@ object NEUItems { priceSource: ItemPriceSource = ItemPriceSource.BAZAAR_INSTANT_BUY, pastRecipes: List = emptyList(), ): Double? { - if (this == NEUInternalName.WISP_POTION) { - return 20_000.0 + when (this) { + NEUInternalName.WISP_POTION -> return 20_000.0 + NEUInternalName.SKYBLOCK_COIN -> return 1.0 } if (priceSource != ItemPriceSource.NPC_SELL) { @@ -209,7 +210,9 @@ object NEUItems { fun NEUInternalName.getRawCraftCostOrNull(pastRecipes: List = emptyList()): Double? = manager.auctionManager.getCraftCost(asString())?.craftCost ?: run { getRecipes(this).filter { it !in pastRecipes } - .map { ItemUtils.getRecipePrice(it, pastRecipes + it) }.minOrNull() + .map { ItemUtils.getRecipePrice(it, pastRecipes + it) } + .filter { it >= 0 } + .minOrNull() } fun NEUInternalName.getItemStackOrNull(): ItemStack? = ItemResolutionQuery(manager) -- cgit