From a716e5d26a6ae6c79300c298c221382fb73e21a8 Mon Sep 17 00:00:00 2001 From: sayomaki Date: Mon, 15 Jul 2024 22:44:38 +0800 Subject: Fix: Buying items may incorrectly trigger compact hoppity messages (#2201) --- .../skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt | 6 ++++-- .../hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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 a74338d77..f9a25f3d5 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 @@ -87,8 +87,10 @@ object HoppityEggsCompactChat { } HoppityEggsManager.eggBoughtPattern.matchMatcher(event.message) { - rabbitBought = true - compactChat(event) + if (group("rabbitname").equals(lastName)) { + rabbitBought = true + compactChat(event) + } } HoppityEggsManager.rabbitFoundPattern.matchMatcher(event.message) { 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 5e51a7693..86213e88b 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 @@ -49,7 +49,7 @@ object HoppityEggsManager { */ val eggBoughtPattern by ChocolateFactoryAPI.patternGroup.pattern( "egg.bought", - "§aYou bought §r§.(?.*?) §r§afor §r§6((\\d|,)*) Coins§r§a!", + "§aYou bought §r(?.*?) §r§afor §r§6((\\d|,)*) Coins§r§a!", ) /** -- cgit