from retail

This commit is contained in:
NoM0Re
2025-01-28 20:40:12 +01:00
parent 8cc8d5ea62
commit fb09181ee7
3 changed files with 18 additions and 7 deletions
@@ -449,7 +449,11 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
expirationTime = math.huge
end
end
local duration = totalProperty and state[totalProperty] or 0
if type(duration) ~= "number" then
duration = 0
end
local adjustMin
if minMaxConfig.adjustedMin then
adjustMin = minMaxConfig.adjustedMin
@@ -469,6 +473,7 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
else
max = duration
end
self.minProgress, self.maxProgress = adjustMin, max
self.progressType = "timed"
self.duration = max - adjustMin