aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuna <luna@alexia.lol>2024-08-17 09:29:31 +0200
committerGitHub <noreply@github.com>2024-08-17 09:29:31 +0200
commit46dcf1a9050deb7bab8e834e91ae39e818ac507d (patch)
tree9900d85da7d1bb2f95d4ddb1f4f5980aa45f31ee /src
parentb09e62642fdc470e0ab23e870a9c5a3ce6e0c4fe (diff)
downloadskyhanni-46dcf1a9050deb7bab8e834e91ae39e818ac507d.tar.gz
skyhanni-46dcf1a9050deb7bab8e834e91ae39e818ac507d.tar.bz2
skyhanni-46dcf1a9050deb7bab8e834e91ae39e818ac507d.zip
Fix: Negative price for items with no NPC sell price (#2360)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemPriceUtils.kt4
1 files 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<NeuRecipe> = 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) {