From 978691c821a22b06c0b514b5b41266bda1dc7574 Mon Sep 17 00:00:00 2001 From: Maczuga Date: Sun, 9 May 2021 14:34:49 +0200 Subject: [PATCH] Revert "Merge pull request #2289 from nullKomplex/IconStaticCD" This reverts commit 7debbe50cd0efe54e6e4787d4a95b7960cce888f. # Conflicts: # WeakAuras/RegionTypes/Icon.lua --- WeakAuras/RegionTypes/Icon.lua | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index c040a48dad..873233b5fd 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -500,14 +500,9 @@ local function modify(parent, region, data) cooldown:Hide() if(data.cooldown) then function region:SetValue(value, total) - cooldown.value = value - cooldown.total = total - if (value >= 0 and value <= total) then - cooldown:Show() - cooldown:SetCooldown(GetTime() - (total - value), total) - else - cooldown:Hide(); - end + cooldown.duration = 0 + cooldown.expirationTime = math.huge + cooldown:Hide(); end function region:SetTime(duration, expirationTime) @@ -527,7 +522,6 @@ local function modify(parent, region, data) if (cooldown.duration and cooldown.duration > 0.01) then cooldown:Show(); cooldown:SetCooldown(cooldown.expirationTime - cooldown.duration, cooldown.duration); - -- cooldown:Resume() end end @@ -554,7 +548,6 @@ local function modify(parent, region, data) end region:SetTime(max - adjustMin, expirationTime - adjustMin, state.inverse); - cooldown:Resume() elseif state.progressType == "static" then local value = state.value or 0; local total = state.total or 0; @@ -564,7 +557,6 @@ local function modify(parent, region, data) local adjustMin = region.adjustedMin or region.adjustedMinRel or 0; local max = region.adjustedMax or region.adjustedMaxRel or total; region:SetValue(value - adjustMin, max - adjustMin); - cooldown:Pause() else region:SetTime(0, math.huge) end