aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
index 4efb30727..3990e13d6 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt
@@ -17,8 +17,6 @@ class SackAPI {
fun onChat(event: LorenzChatEvent) {
if (!event.message.removeColor().startsWith("[Sacks]")) return
- val sackChanges = ArrayList<SackChange>()
-
val sackAddText = event.chatComponent.siblings.firstNotNullOfOrNull { sibling ->
sibling.chatStyle?.chatHoverEvent?.value?.formattedText?.removeColor()?.takeIf {
it.startsWith("Added")
@@ -36,6 +34,7 @@ class SackAPI {
val otherItemsAdded = sackAddText.contains("other items")
val otherItemsRemoved = sackRemoveText.contains("other items")
+ val sackChanges = ArrayList<SackChange>()
for (match in sackChangeRegex.findAll(sackChangeText)) {
val delta = match.groups[1]!!.value.replace(",", "").toInt()
val item = match.groups[2]!!.value