diff options
author | jani270 <69345714+jani270@users.noreply.github.com> | 2023-11-01 10:40:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 10:40:04 +0100 |
commit | 2efa126057236a912d5b413676f714545e661862 (patch) | |
tree | 7c9974a117108ae6e34bef2f12bc625113f5462d /src/main/java/at/hannibal2/skyhanni/features | |
parent | e29e4ba99b3625061d434517065551dc250b975f (diff) | |
download | skyhanni-2efa126057236a912d5b413676f714545e661862.tar.gz skyhanni-2efa126057236a912d5b413676f714545e661862.tar.bz2 skyhanni-2efa126057236a912d5b413676f714545e661862.zip |
Fixed Great Spook Potion not working in Non God Pot effect feature (#658)
Fixed Great Spook potion not working in Non God Pot Effect feature. #658
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index a1ae6f5ad..f4ce726f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -70,31 +70,31 @@ class NonGodPotEffectDisplay { } if (event.message == "§aYou ate a §r§aRe-heated Gummy Polar Bear§r§a!") { - checkFooter = true effectDuration[NonGodPotEffect.SMOLDERING] = Timer(1.hours) update() } if (event.message == "§a§lBUFF! §fYou have gained §r§2Mushed Glowy Tonic I§r§f! Press TAB or type /effects to view your active effects!") { - checkFooter = true effectDuration[NonGodPotEffect.GLOWY] = Timer(1.hours) update() } if (event.message == "§a§lBUFF! §fYou splashed yourself with §r§bWisp's Ice-Flavored Water I§r§f! Press TAB or type /effects to view your active effects!") { - checkFooter = true effectDuration[NonGodPotEffect.WISP] = Timer(5.minutes) update() } + if (event.message == "§eYou consumed a §r§fGreat Spook Potion§r§e!") { + effectDuration[NonGodPotEffect.GREAT_SPOOK] = Timer(24.hours) + update() + } + if (event.message == "§e[NPC] §6King Yolkar§f: §rThese eggs will help me stomach my pain.") { - checkFooter = true effectDuration[NonGodPotEffect.GOBLIN] = Timer(20.minutes) update() } if (event.message == "§cThe Goblin King's §r§afoul stench §r§chas dissipated!") { - checkFooter = true effectDuration.remove(NonGodPotEffect.GOBLIN) update() } @@ -199,9 +199,11 @@ class NonGodPotEffectDisplay { var effectsCount = 0 for (line in lines) { for (effect in NonGodPotEffect.entries) { - if (line.startsWith(effect.tabListName)) { + val tabListName = effect.tabListName + if (line.startsWith(tabListName)) { + val string = line.substring(tabListName.length) try { - val duration = TimeUtils.getMillis(line.split("§f")[1]) + val duration = TimeUtils.getMillis(string.split("§f")[1]) effectDuration[effect] = Timer(duration.milliseconds) update() } catch (e: IndexOutOfBoundsException) { |