From dad666d61de412fa22f941533cb52b2d8f03efbf Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 5 Jan 2021 06:13:00 -0500 Subject: [PATCH] fix(runes): ensure GetRunesCooldown() returns >=0 (#790) --- src/states/Runes.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/states/Runes.ts b/src/states/Runes.ts index 79b55bcb1..6634a466b 100644 --- a/src/states/Runes.ts +++ b/src/states/Runes.ts @@ -310,7 +310,11 @@ export class OvaleRunesClass extends States implements StateModule { this.profiler.StartProfiling("OvaleRunes_state_GetRunesCooldown"); for (let slot = 1; slot <= RUNE_SLOTS; slot += 1) { const rune = state.rune[slot]; - usedRune[slot] = rune.endCooldown - atTime; + if (IsActiveRune(rune, atTime)) { + usedRune[slot] = 0; + } else { + usedRune[slot] = rune.endCooldown - atTime; + } } sort(usedRune); this.profiler.StopProfiling("OvaleRunes_state_GetRunesCooldown");