aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 23ed9be71..25d67bb07 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -47,6 +47,14 @@ object NEUItems {
.resolveInternalName() ?: ""
}
+ fun getPriceOrNull(internalName: String, useSellingPrice: Boolean = false): Double? {
+ val price = getPrice(internalName, useSellingPrice)
+ if (price == -1.0) {
+ return null
+ }
+ return price
+ }
+
fun getPrice(internalName: String, useSellingPrice: Boolean = false): Double {
val bazaarData = BazaarApi.getBazaarDataForInternalName(internalName)
bazaarData?.let {