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
+11 -6
View File
@@ -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,