Skip to content

Commit 3281b5e

Browse files
committed
fix main comparison timer (probably)
1 parent 57eb22c commit 3281b5e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Display.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,10 @@ function MPT:UpdateTimerBar(Start, Completion, preview)
302302
-- add pb
303303
local before = false
304304
local date = C_DateAndTime.GetCurrentCalendarTime()
305-
if self.cmap and self.level and not preview then
306-
before = self:UpdatePB(time, self.forcesTime, self.cmap, level, date, self.BossTimes, self.BossNames)
305+
if (self.cmap and self.level) and not preview then
306+
before = self:UpdatePB(time, self.forcesTime, self.cmap, self.level, date, self.BossTimes, self.BossNames)
307307
end
308308
self.timer = preview and self.timer or time/1000
309-
local timeremain = self.timelimit-self.timer
310309
local diff = before and (time-before)/1000
311310
if not preview then F.TimerBar:SetStatusBarColor(unpack(self.TimerBar.Color[chest+1])) end
312311
self:DisplayTimerElements(chest, true, preview, diff)
@@ -339,7 +338,7 @@ function MPT:DisplayTimerElements(chest, completion, preview, diff)
339338
timertext = timeMS and ("%s%s"):format(timertext, timeMS) or timertext
340339
end
341340
local upgrades = completion and C_ChallengeMode.GetChallengeCompletionInfo().keystoneUpgradeLevels or 0
342-
local timercolor = completion and (upgrades > 0 and self.TimerText.SuccessColor or self.TimerText.FailColor) or self.TimerText.Color
341+
local timercolor = (completion and (upgrades > 0 and self.TimerText.SuccessColor or self.TimerText.FailColor)) or self.TimerText.Color
343342
self:ApplyTextSettings(F.TimerBar.TimerText, self.TimerText, string.format("%s/%s", timertext, self:FormatTime(self.timelimit)))
344343
if diff or preview then
345344
local ComparisonTime = preview and math.random(-200, 200) or diff or 0 -- math.random(-200, 200)

0 commit comments

Comments
 (0)