From 8e46127169a1e06338cc656c254399cf272ea4de Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 20 Jun 2024 22:54:17 +0200 Subject: Fix: Compact Mythic Rabbit (#2093) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt | 7 ++++++- .../skyhanni/features/event/hoppity/HoppityEggsManager.kt | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt index d5542fdca..a74338d77 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt @@ -107,9 +107,14 @@ object HoppityEggsCompactChat { } HoppityEggsManager.newRabbitFound.matchMatcher(event.message) { + newRabbit = true + groupOrNull("other")?.let { + lastProfit = it + compactChat(event) + return + } val chocolate = groupOrNull("chocolate") val perSecond = group("perSecond") - newRabbit = true lastProfit = chocolate?.let { "§6+$it §7and §6+${perSecond}x c/s!" } ?: "§6+${perSecond}x c/s!" diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index 0640bfff2..3ecfa9f81 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -66,10 +66,11 @@ object HoppityEggsManager { /** * REGEX-TEST: §d§lNEW RABBIT! §6+2 Chocolate §7and §6+0.003x Chocolate §7per second! * REGEX-TEST: §d§lNEW RABBIT! §6+0.02x Chocolate §7per second! + * REGEX-TEST: §d§lNEW RABBIT! §7Your §dTime Tower §7charge time is now §a7h§7! */ val newRabbitFound by ChocolateFactoryAPI.patternGroup.pattern( "rabbit.found.new", - "§d§lNEW RABBIT! (§6\\+(?.*) Chocolate §7and )?§6\\+(?.*)x Chocolate §7per second!" + "§d§lNEW RABBIT! (?:((§6\\+(?.*) Chocolate §7and )?§6\\+(?.*)x Chocolate §7per second!)|(?.*))" ) private val noEggsLeftPattern by ChocolateFactoryAPI.patternGroup.pattern( "egg.noneleft", -- cgit