aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-07-15 16:55:02 +0200
committerGitHub <noreply@github.com>2024-07-15 16:55:02 +0200
commit82f2a2c6ea8c4b552cc5e65e27c397308fcb8989 (patch)
tree4f3c2e922e7e7b5214814b75d676229de03bd89d /src/main
parent6f32006525865f5344972953c1f621fbfaadaea7 (diff)
downloadskyhanni-82f2a2c6ea8c4b552cc5e65e27c397308fcb8989.tar.gz
skyhanni-82f2a2c6ea8c4b552cc5e65e27c397308fcb8989.tar.bz2
skyhanni-82f2a2c6ea8c4b552cc5e65e27c397308fcb8989.zip
Fix: Kuudra Key Value (#2205)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt9
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)