From 0b67884057c3dd6d4fcfcec7ff6cc0730822ffa9 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Tue, 23 Aug 2022 13:47:01 +0200 Subject: support minion pickup fixed damage indicator sorting previous damages --- .../at/hannibal2/skyhanni/features/damageindicator/DamageCounter.kt | 4 +++- .../skyhanni/features/damageindicator/DamageIndicatorManager.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageCounter.kt index 84bc7d50a..711523175 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageCounter.kt @@ -1,10 +1,12 @@ package at.hannibal2.skyhanni.features.damageindicator +import java.util.* + class DamageCounter { var currentDamage = 0L var currentHealing = 0L - var oldDamages = mutableListOf() + var oldDamages = LinkedList() var firstTick = 0L } \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt index 072661329..78e8ca648 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt @@ -167,7 +167,7 @@ class DamageIndicatorManager { } if (now > damageCounter.firstTick + 1_000) { - damageCounter.oldDamages.add(OldDamage(now, damageCounter.currentDamage, damageCounter.currentHealing)) + damageCounter.oldDamages.add(0, OldDamage(now, damageCounter.currentDamage, damageCounter.currentHealing)) damageCounter.firstTick = 0L damageCounter.currentDamage = 0 damageCounter.currentHealing = 0 -- cgit