From 7de2478932e07721b3598706d99c2f790208aa39 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Thu, 21 Nov 2024 00:34:11 +0100 Subject: [PATCH] runes: Be less wasteful with API calls --- 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)