from retail

This commit is contained in:
NoM0Re
2025-01-22 18:56:11 +01:00
parent 674ea9fe1e
commit 8dcb62ec81
6 changed files with 29 additions and 32 deletions
+3 -3
View File
@@ -453,16 +453,16 @@ local function modify(parent, region, data)
end
function region:SetInverse(inverse)
if region.inverse == inverse then
if region.inverseDirection == inverse then
return
end
region.inverse = inverse
region.inverseDirection = inverse
region:UpdateEffectiveInverse()
end
function region:UpdateEffectiveInverse()
-- If cooldown.inverse == false then effectiveReverse = not inverse
-- If cooldown.inverse == true then effectiveReverse = inverse
local effectiveReverse = not region.inverse == not cooldown.inverse
local effectiveReverse = not region.inverseDirection == not cooldown.inverse
cooldown:SetReverse(effectiveReverse)
if (cooldown.expirationTime and cooldown.duration and cooldown:IsShown()) then
-- WORKAROUND SetReverse not applying until next frame
@@ -903,6 +903,11 @@ local function modify(parent, region, data)
else
region:SetValueOnTexture(progress);
end
if self.FrameTick then
self.FrameTick = nil
self.subRegionEvents:RemoveSubscriber("FrameTick", region)
end
end
if region.useSmoothProgress then
+4 -1
View File
@@ -428,8 +428,11 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
else
adjustMin = 0
end
local max
if minMaxConfig.adjustedMax then
if duration == 0 then
max = 0
elseif minMaxConfig.adjustedMax then
max = minMaxConfig.adjustedMax
elseif minMaxConfig.adjustedMaxRelPercent then
max = minMaxConfig.adjustedMaxRelPercent * duration