from retail
This commit is contained in:
@@ -878,6 +878,7 @@ local function modify(parent, region, data)
|
||||
end
|
||||
end
|
||||
|
||||
region.TimerTick = nil
|
||||
function region:Update()
|
||||
local state = region.state
|
||||
|
||||
@@ -890,7 +891,7 @@ local function modify(parent, region, data)
|
||||
end
|
||||
if region.TimerTick then
|
||||
region.TimerTick = nil
|
||||
region:UpdateRegionHasTimerTick()
|
||||
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
|
||||
end
|
||||
expirationTime = GetTime() + (state.remaining or 0)
|
||||
else
|
||||
@@ -899,7 +900,7 @@ local function modify(parent, region, data)
|
||||
end
|
||||
if not region.TimerTick then
|
||||
region.TimerTick = TimerTick
|
||||
region:UpdateRegionHasTimerTick()
|
||||
region.subRegionEvents:AddSubscriber("TimerTick", region, true)
|
||||
end
|
||||
expirationTime = state.expirationTime and state.expirationTime > 0 and state.expirationTime or math.huge;
|
||||
end
|
||||
@@ -945,7 +946,7 @@ local function modify(parent, region, data)
|
||||
region:SetValue(value - adjustMin, max - adjustMin);
|
||||
if region.TimerTick then
|
||||
region.TimerTick = nil
|
||||
region:UpdateRegionHasTimerTick()
|
||||
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
|
||||
end
|
||||
else
|
||||
if region.paused then
|
||||
@@ -954,7 +955,7 @@ local function modify(parent, region, data)
|
||||
region:SetTime(0, math.huge)
|
||||
if region.TimerTick then
|
||||
region.TimerTick = nil
|
||||
region:UpdateRegionHasTimerTick()
|
||||
region.subRegionEvents:RemoveSubscriber("TimerTick", region)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user