|
17 | 17 | function MPT:Init(preview) |
18 | 18 | self:SetKeyInfo(true) |
19 | 19 | self.opened = false |
20 | | - self.done = false |
21 | 20 | self.IsPreview = preview |
22 | 21 | self.PreviousMaxBossFrame = 0 |
23 | | - self:CreateStates(preview) |
| 22 | + local time = C_ChallengeMode.GetChallengeCompletionInfo().time |
| 23 | + if time == 0 then -- prevent setting this to false on completion |
| 24 | + self.done = false |
| 25 | + self:CreateStates(preview) |
| 26 | + end |
24 | 27 | end |
25 | 28 |
|
26 | 29 | function MPT:SetKeyInfo(init) |
@@ -606,17 +609,19 @@ function MPT:UpdateEnemyForces(Start, preview, completion) |
606 | 609 | if percent >= 100 or criteria.completed then |
607 | 610 | local cur = criteria.elapsed and select(2, GetWorldElapsedTime(1)) - criteria.elapsed |
608 | 611 | local pb = self.ForcesSplits.enabled and self:GetPB(self.cmap, self.level, self.seasonID, self.LowerKey) |
609 | | - if pb and pb["forces"] then |
| 612 | + if pb and pb["forces"] and not self.done then |
610 | 613 | local diff = cur - pb["forces"] |
611 | 614 | local color = (diff == 0 and self.ForcesSplits.EqualColor) or (diff < 0 and self.ForcesSplits.SuccessColor) or self.ForcesSplits.FailColor |
612 | 615 | local prefix = (diff == 0 and "+-0") or (diff < 0 and "-") or "+" |
613 | 616 | if diff < 0 then diff = diff * -1 end |
614 | 617 | self:ApplyTextSettings(F.ForcesBar.Splits, self.ForcesSplits, prefix..self:FormatTime(diff), color) |
615 | 618 | end |
| 619 | + if not self.done then |
| 620 | + self.forcesTime = cur or 0 |
| 621 | + local completionText = cur and self:FormatTime(cur) or "" |
| 622 | + self:ApplyTextSettings(F.ForcesBar.Completion, self.ForcesCompletion, completionText, self.ForcesCompletion.Color) |
| 623 | + end |
616 | 624 | self.done = true |
617 | | - self.forcesTime = cur or 0 |
618 | | - local completionText = cur and self:FormatTime(cur) or "" |
619 | | - self:ApplyTextSettings(F.ForcesBar.Completion, self.ForcesCompletion, completionText, self.ForcesCompletion.Color) |
620 | 625 | F.ForcesBar:SetStatusBarColor(unpack(self.ForcesBar.CompletionColor)) |
621 | 626 | F.ForcesBar:SetMinMaxValues(0, 1) |
622 | 627 | F.ForcesBar:SetValue(1) |
|
0 commit comments