From 3c46a9936206e6c1cd2f9760de9a311c0566d6fd Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 12 Nov 2023 11:02:34 +0100 Subject: Fixed dungeon level being 0 in skill inventory. --- .../inventory/ItemDisplayOverlayFeatures.kt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 31c606d55..739ba6a1b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -95,27 +95,29 @@ class ItemDisplayOverlayFeatures { } } - if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9) && InventoryUtils.openInventoryName() == "Your Skills" && item.getLore().any { it.contains("Click to view!") }) { + if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9) && + InventoryUtils.openInventoryName() == "Your Skills" && + item.getLore().any { it.contains("Click to view!") }) { if (CollectionAPI.isCollectionTier0(item.getLore())) return "0" val split = itemName.split(" ") - if (split.size < 2) return "0" if (!itemName.contains("Dungeon")) { val text = split.last() + if (split.size < 2) return "0" return "" + text.romanToDecimalIfNeeded() } } if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10) && InventoryUtils.openInventoryName().endsWith(" Collections")) { - val lore = item.getLore() - if (lore.any { it.contains("Click to view!") }) { - if (CollectionAPI.isCollectionTier0(lore)) return "0" - item.name?.let { - if (it.startsWith("§e")) { - val text = it.split(" ").last() - return "" + text.romanToDecimalIfNeeded() - } + val lore = item.getLore() + if (lore.any { it.contains("Click to view!") }) { + if (CollectionAPI.isCollectionTier0(lore)) return "0" + item.name?.let { + if (it.startsWith("§e")) { + val text = it.split(" ").last() + return "" + text.romanToDecimalIfNeeded() } } + } } if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(11) && itemName.contains("Rancher's Boots")) { -- cgit