From d7b382ab6fde6d27fe0bd40dbd28b7acc4422eca Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 25 May 2023 19:04:28 +1000 Subject: Fix for wardrobe value (#175) --- .../hannibal2/skyhanni/features/misc/items/EstimatedWardrobePrice.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedWardrobePrice.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedWardrobePrice.kt index f7ed6601f..3b6470660 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedWardrobePrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/EstimatedWardrobePrice.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.misc.items import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils @@ -18,6 +19,7 @@ class EstimatedWardrobePrice { fun onTooltip(event: LorenzToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.estimatedIemValueArmor) return + if (!InventoryUtils.openInventoryName().contains("Wardrobe")) return val slot = event.slot.slotNumber val id = slot % 9 @@ -38,7 +40,7 @@ class EstimatedWardrobePrice { toolTip.add(index++, " §7- $name: §6${NumberUtil.format(price)}") } - toolTip.add(index++, " §aTotal Value: §6§l${NumberUtil.format(totalPrice)}") + toolTip.add(index, " §aTotal Value: §6§l${NumberUtil.format(totalPrice)}") } @SubscribeEvent -- cgit