from retail
This commit is contained in:
@@ -1071,7 +1071,8 @@ local function AddFakeInformation(data, triggernum, state, eventData)
|
||||
state.progressType = "timed"
|
||||
end
|
||||
if state.progressType == "timed" then
|
||||
if state.expirationTime and state.expirationTime ~= math.huge and state.expirationTime > GetTime() then
|
||||
local expirationTime = state.expirationTime
|
||||
if expirationTime and type(expirationTime) == "number" and expirationTime ~= math.huge and expirationTime > GetTime() then
|
||||
return
|
||||
end
|
||||
state.progressType = "timed"
|
||||
|
||||
@@ -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
|
||||
|
||||
+11
-6
@@ -4036,10 +4036,16 @@ do
|
||||
local changed = false
|
||||
for triggernum, triggerData in ipairs(triggers) do
|
||||
for id, state in pairs(triggerData) do
|
||||
if state.progressType == "timed" and state.expirationTime and state.expirationTime < t and state.duration and state.duration > 0 then
|
||||
state.expirationTime = t + state.duration
|
||||
state.changed = true
|
||||
changed = true
|
||||
if state.progressType == "timed" then
|
||||
local expirationTime = state.expirationTime
|
||||
local duration = state.duration
|
||||
if expirationTime and type(expirationTime) == "number" and expirationTime < t
|
||||
and duration and type(duration) == "number" and duration > 0
|
||||
then
|
||||
state.expirationTime = t + state.duration
|
||||
state.changed = true
|
||||
changed = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4161,7 +4167,7 @@ local function startStopTimers(id, cloneId, triggernum, state)
|
||||
timer:CancelTimer(record.handle);
|
||||
end
|
||||
|
||||
if expirationTime then
|
||||
if expirationTime and type(expirationTime) == "number" then
|
||||
record.handle = timer:ScheduleTimer(
|
||||
function()
|
||||
if (state.show ~= false and state.show ~= nil) then
|
||||
@@ -4172,7 +4178,6 @@ local function startStopTimers(id, cloneId, triggernum, state)
|
||||
if Private.watched_trigger_events[id] and Private.watched_trigger_events[id][triggernum] then
|
||||
Private.AddToWatchedTriggerDelay(id, triggernum)
|
||||
end
|
||||
|
||||
Private.UpdatedTriggerState(id);
|
||||
end
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user