From 8e13b2bd847d4ad2aadc1b05adbb67076a768982 Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:33:39 -0400 Subject: Fix: Golden Strays Causing New Rabbits to Detect as Dupes (#2090) * Add more explicit resetting of data before and after parsing * Remove test line * Formatting * renamed vars to data for consistency --------- Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/event/hoppity/HoppityEggsCompactChat.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2') 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 bd90777b3..a0a42c767 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 @@ -46,14 +46,18 @@ object HoppityEggsCompactChat { if (hoppityEggChat.isNotEmpty()) { ChatUtils.hoverableChat(createCompactMessage(), hover = hoppityEggChat, prefix = false) } + resetCompactData() + } + private fun resetCompactData() { + this.hoppityEggChat = mutableListOf() this.duplicate = false this.newRabbit = false - lastRarity = "" - lastName = "" - lastProfit = "" - lastChatMeal = null - lastDuplicateAmount = null + this.lastRarity = "" + this.lastName = "" + this.lastProfit = "" + this.lastChatMeal = null + this.lastDuplicateAmount = null } private fun createCompactMessage(): String { @@ -74,7 +78,7 @@ object HoppityEggsCompactChat { fun handleChat(event: LorenzChatEvent) { HoppityEggsManager.eggFoundPattern.matchMatcher(event.message) { - hoppityEggChat = mutableListOf() + resetCompactData() lastChatMeal = getEggType(event) compactChat(event) } -- cgit