Skip to content

Commit

Permalink
fix(runes): ensure GetRunesCooldown() returns >=0 (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnylam88 committed Jan 5, 2021
1 parent 8f895c1 commit dad666d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/states/Runes.ts
Expand Up @@ -310,7 +310,11 @@ export class OvaleRunesClass extends States<RuneData> 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");
Expand Down

0 comments on commit dad666d

Please sign in to comment.