diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt index 52916b98d..e5afd887e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/CombatUtils.kt @@ -25,7 +25,6 @@ object CombatUtils { private var gainTimer = 0 var _isKilling = false - /** * Taken from NotEnoughUpdates */ @@ -44,11 +43,13 @@ object CombatUtils { xpGainQueue.add(0, delta) calculateXPHour() } + xpGainTimer > 0 -> { xpGainTimer-- xpGainQueue.add(0, 0f) calculateXPHour() } + delta <= 0 -> { isKilling = false } @@ -57,7 +58,7 @@ object CombatUtils { lastTotalXp = totalXp } - private fun calculateXPHour(){ + private fun calculateXPHour() { while (xpGainQueue.size > 30) { xpGainQueue.removeLast() } |