From 6c8fc0df08331da7e49796985a1df5f14e6d7ac3 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 2 May 2024 16:01:39 +0200 Subject: Backend: Bazaar Fetcher (#1597) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: Cal --- .../hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/test') diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index 7e9427996..b81a25599 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames +import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi.Companion.getBazaarData import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy @@ -460,7 +461,21 @@ class SkyHanniDebugsAndTests { val internalName = event.itemStack.getInternalNameOrNull() ?: return val npcPrice = internalName.getNpcPriceOrNull() ?: return - event.toolTip.add("§7NPC price: §6${npcPrice.addSeparators()}") + event.toolTip.add("§7NPC price: ${npcPrice.addSeparators()}") + } + + @SubscribeEvent + fun onShowBzPrice(event: LorenzToolTipEvent) { + if (!LorenzUtils.inSkyBlock) return + if (!debugConfig.showBZPrice) return + val internalName = event.itemStack.getInternalNameOrNull() ?: return + + val data = internalName.getBazaarData() ?: return + val instantBuyPrice = data.instantBuyPrice + val sellOfferPrice = data.sellOfferPrice + + event.toolTip.add("§7BZ instantBuyPrice: ${instantBuyPrice.addSeparators()}") + event.toolTip.add("§7BZ sellOfferPrice: ${sellOfferPrice.addSeparators()}") } @SubscribeEvent -- cgit