aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 430edc971..b3d92e68f 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -150,7 +150,6 @@ object NEUItems {
fun getInternalNameOrNull(nbt: NBTTagCompound): NEUInternalName? =
ItemResolutionQuery(manager).withItemNBT(nbt).resolveInternalName()?.asInternalName()
-
fun NEUInternalName.getPrice(useSellingPrice: Boolean = false) = getPriceOrNull(useSellingPrice) ?: -1.0
fun NEUInternalName.getNpcPrice() = getNpcPriceOrNull() ?: -1.0
@@ -184,9 +183,12 @@ object NEUItems {
// 6.8 for some players
return 7.0 // NPC price
}
- return getNpcPriceOrNull()
+
+ return getNpcPriceOrNull() ?: getRawCraftCostOrNull()
}
+ fun NEUInternalName.getRawCraftCostOrNull(): Double? = manager.auctionManager.getCraftCost(asString())?.craftCost
+
fun NEUInternalName.getItemStackOrNull(): ItemStack? = ItemResolutionQuery(manager)
.withKnownInternalName(asString())
.resolveToItemStack()?.copy()