From 7eb3e77e5ce50989af3cd4ab2b196fb0df76e168 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:11:40 +0200 Subject: Removing npc price from bazaar data and Fixed multiple bugs with garden visitor --- src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index b706bfb68..bf97892bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.features.bazaar.BazaarDataHolder import at.hannibal2.skyhanni.test.command.CopyErrorCommand import at.hannibal2.skyhanni.utils.ItemBlink.checkBlinkItem import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old @@ -138,11 +139,16 @@ object NEUItems { fun NEUInternalName.getPriceOrNull(useSellingPrice: Boolean = false): Double? { val price = getPrice(useSellingPrice) if (price == -1.0) { + getNpcPrice() return null } return price } + fun NEUInternalName.getNpcPrice() = getNpcPriceOrNull() ?: -1.0 + + fun NEUInternalName.getNpcPriceOrNull() = BazaarDataHolder.getNpcPrice(this) + fun transHypixelNameToInternalName(hypixelId: String) = manager.auctionManager.transformHypixelBazaarToNEUItemId(hypixelId).asInternalName() -- cgit