diff options
author | David Cole <40234707+DavidArthurCole@users.noreply.github.com> | 2024-06-14 10:33:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 16:33:39 +0200 |
commit | 8e13b2bd847d4ad2aadc1b05adbb67076a768982 (patch) | |
tree | c825c1744d38d3bff1c27112b8a135b11b3755de /src/main/java | |
parent | fb94ced40df8dfd14c16d7138c345419c8c011ed (diff) | |
download | skyhanni-8e13b2bd847d4ad2aadc1b05adbb67076a768982.tar.gz skyhanni-8e13b2bd847d4ad2aadc1b05adbb67076a768982.tar.bz2 skyhanni-8e13b2bd847d4ad2aadc1b05adbb67076a768982.zip |
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>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt | 16 |
1 files changed, 10 insertions, 6 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 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) } |