Skip to content

Commit

Permalink
runes: Be less wasteful with API calls (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim authored Nov 30, 2024
1 parent b41046b commit b0bde13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elements/runes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
Expand Down

0 comments on commit b0bde13

Please sign in to comment.