From 96d86761b3f0ccf0c1c2290741b67d396e563c1d Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Sat, 28 Oct 2023 00:29:57 +0200 Subject: fixed detection of ghost itemstack in bestiary (#637) GhostCounter: Fixed detection of Ghost ItemStack in bestiary menu #637 --- .../hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt index cb80263c8..959a303e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt @@ -455,7 +455,7 @@ object GhostCounter { val inventoryName = event.inventoryName if (inventoryName != "Bestiary ➜ Dwarven Mines") return val stacks = event.inventoryItems - val ghostStack = stacks[10] ?: return + val ghostStack = stacks.values.find { it.displayName.contains("Ghost") } ?: return val bestiaryNextLevel = if ("§\\wGhost".toRegex().matches(ghostStack.displayName)) 1 else ghostStack.displayName.substring(8) .romanToDecimal() + 1 @@ -491,4 +491,4 @@ object GhostCounter { fun isEnabled(): Boolean { return LorenzUtils.inSkyBlock && config.enabled && LorenzUtils.skyBlockIsland == IslandType.DWARVEN_MINES } -} \ No newline at end of file +} -- cgit