Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Revert "Merge pull request WeakAuras#2289 from nullKomplex/IconStaticCD"
Browse files Browse the repository at this point in the history
This reverts commit 7debbe5.

# Conflicts:
#	WeakAuras/RegionTypes/Icon.lua
  • Loading branch information
Maczuga committed May 9, 2021
1 parent f92cf3b commit 978691c
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions WeakAuras/RegionTypes/Icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand All @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 978691c

Please sign in to comment.