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 --- .../hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer') diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt index e5f846252..c402becdb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemProfitTracker.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.LorenzUtils.addSelector import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc +import at.hannibal2.skyhanni.utils.NEUItems.getNpcPrice import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems @@ -299,13 +300,13 @@ object SlayerItemProfitTracker { } private fun getPrice(internalName: NEUInternalName) = - internalName.getBazaarData()?.let { getPrice(it) } ?: internalName.getPrice() + internalName.getBazaarData()?.let { getPrice(internalName, it) } ?: internalName.getPrice() - private fun getPrice(bazaarData: BazaarData) = when (config.priceFrom) { + private fun getPrice(internalName: NEUInternalName, bazaarData: BazaarData) = when (config.priceFrom) { 0 -> bazaarData.sellPrice 1 -> bazaarData.buyPrice - else -> bazaarData.npcPrice + else -> internalName.getNpcPrice() } @SubscribeEvent -- cgit