From b0bde13b539911011f677554189d9c3cd6595d95 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 30 Nov 2024 13:34:29 +0100 Subject: [PATCH] runes: Be less wasteful with API calls (#690) --- elements/runes.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elements/runes.lua b/elements/runes.lua index f86639d2..ac397226 100644 --- a/elements/runes.lua +++ b/elements/runes.lua @@ -142,6 +142,7 @@ local function Update(self, event) hasSortOrder = false end + local currentTime = GetTime() local rune, start, duration, runeReady for index, runeID in next, runemap do rune = element[index] @@ -156,7 +157,7 @@ local function Update(self, event) rune:SetValue(1) rune:SetScript('OnUpdate', nil) elseif(start) then - rune.duration = GetTime() - start + rune.duration = currentTime - start rune:SetMinMaxValues(0, duration) rune:SetValue(0) rune:SetScript('OnUpdate', onUpdate)