diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 9 |
1 files 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<NeuRecipe> = 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<NeuRecipe> = 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) |