From 8b4cf7d640d2941026625b54f849a143dff871e9 Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Tue, 27 Jun 2023 21:22:33 +0200 Subject: Merge pull request #261 * Fixed an error when players had no ghost kill --- src/main/java/at/hannibal2/skyhanni/features/misc/GhostCounter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/GhostCounter.kt index 0be9f0655..58f190434 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/GhostCounter.kt @@ -357,7 +357,7 @@ object GhostCounter { if (inventoryName != "Bestiary ➜ Deep Caverns") return val stacks = event.inventoryItems val ghostStack = stacks[13] ?: return - val bestiaryNextLevel = Utils.parseIntOrRomanNumeral(ghostStack.displayName.substring(8)) + 1 + val bestiaryNextLevel = if (ghostStack.displayName == "§cGhost") 1 else Utils.parseIntOrRomanNumeral(ghostStack.displayName.substring(8)) + 1 hidden?.bestiaryNextLevel = bestiaryNextLevel.toDouble() for (line in ghostStack.getLore()) { -- cgit