aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt4
1 files changed, 2 insertions, 2 deletions
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
+}