Skip to content

Commit 65192d5

Browse files
committed
prevent split-display from overwriting itself to prevent a likely blizzard? bug
1 parent bc823c3 commit 65192d5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Display.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ function MPT:UpdateBosses(Start, count, preview)
434434
end
435435
elseif Start and not self.IsPreview then
436436
self:SetKeyInfo()
437+
self.BossSplitted = {}
437438
self.BossTimes = {}
438439
self.BossNames = {}
439440
local max = select(3, C_Scenario.GetStepInfo())
@@ -512,15 +513,15 @@ function MPT:UpdateBosses(Start, count, preview)
512513
end
513514
if pb2 and pb2[i] then
514515
local time = completed and select(2, GetWorldElapsedTime(1))-defeated or pb2[i]
515-
if self.cmap == 556 and i == 3 then time = select(2, GetWorldElapsedTime(1)) end -- This one doesn't give info about the actual comppletion
516+
if self.cmap == 556 and i == 3 then time = select(2, GetWorldElapsedTime(1)) end -- This one doesn't give info about the actual completion
516517
local timercolor = completed and ((pb2[i] == time and self.BossTimer.EqualColor) or (pb2[i] > time and self.BossTimer.SuccessColor) or self.BossTimer.FailColor) or self.BossTimer.Color
517518
self:ApplyTextSettings(frame["BossTimer"..i], self.BossTimer, self:FormatTime(time), timercolor)
518519
elseif self.cmap == 556 and i == 3 then -- Pit of Saron Quarry liberated display
519520
self:ApplyTextSettings(frame["BossTimer"..i], self.BossTimer, criteria.quantityString.."/"..criteria.totalQuantity, BossColor)
520521
end
521-
if completed and defeated and pb and pb[i] then
522+
if completed and defeated and pb and pb[i] and not self.BossSplitted[i] then
522523
local time = select(2, GetWorldElapsedTime(1))-defeated or 0
523-
if self.cmap == 556 and i == 3 then time = select(2, GetWorldElapsedTime(1)) end -- This one doesn't give info about the actual comppletion
524+
if self.cmap == 556 and i == 3 then time = select(2, GetWorldElapsedTime(1)) end -- This one doesn't give info about the actual completion
524525
local splitcolor = (pb[i] == time and self.BossSplit.EqualColor) or (pb[i] > time and self.BossSplit.SuccessColor) or self.BossSplit.FailColor
525526
local prefix = (pb[i] == time and "+-0") or (pb[i] > time and "-") or "+"
526527
local diff = time-pb[i]
@@ -529,6 +530,7 @@ function MPT:UpdateBosses(Start, count, preview)
529530
else
530531
frame["BossSplit"..i]:SetText("")
531532
end
533+
if completed then self.BossSplitted[i] = true end
532534
frame:Show()
533535
end
534536
end
@@ -552,7 +554,7 @@ function MPT:UpdateBosses(Start, count, preview)
552554
local pb = self.BossSplit.enabled and self:GetPB(self.cmap, self.level, self.seasonID, self.LowerKey)
553555
for i=1, max do
554556
local criteria = C_ScenarioInfo.GetCriteriaInfo(i)
555-
if criteria.completed then
557+
if criteria.completed and not self.BossSplitted[i] then
556558
local frame = self:CreateBossFrame(i)
557559
local defeated = criteria.elapsed
558560
frame["BossName"..i]:SetTextColor(unpack(self.BossName.CompletionColor))
@@ -575,6 +577,7 @@ function MPT:UpdateBosses(Start, count, preview)
575577
if diff < 0 then diff = diff*-1 end
576578
self:ApplyTextSettings(frame["BossSplit"..i], self.BossSplit, prefix..self:FormatTime(diff), splitcolor)
577579
end
580+
self.BossSplitted[i] = true
578581
elseif self.cmap == 556 and i == 3 then -- Quarry Camps in Pit of Saron
579582
local frame = self:CreateBossFrame(i)
580583
self:ApplyTextSettings(frame["BossTimer"..i], self.BossTimer, criteria.quantityString.."/"..criteria.totalQuantity, self.BossName.Color)

0 commit comments

Comments
 (0)