diff options
author | HiZe_ <superhize@hotmail.com> | 2023-10-28 00:29:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-28 00:29:57 +0200 |
commit | 96d86761b3f0ccf0c1c2290741b67d396e563c1d (patch) | |
tree | e16da88e331f466b389a5cf5619632aa782c1c57 /src/main/java | |
parent | 05144bd6ce9d640ed628a5dcafcdaa0d55ba9128 (diff) | |
download | skyhanni-96d86761b3f0ccf0c1c2290741b67d396e563c1d.tar.gz skyhanni-96d86761b3f0ccf0c1c2290741b67d396e563c1d.tar.bz2 skyhanni-96d86761b3f0ccf0c1c2290741b67d396e563c1d.zip |
fixed detection of ghost itemstack in bestiary (#637)
GhostCounter: Fixed detection of Ghost ItemStack in bestiary menu #637
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt | 4 |
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 +} |