Skip to content

Commit 2ad6032

Browse files
committed
force ForcesBar to 100% on CM completion event
1 parent 71d4fb1 commit 2ad6032

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Display.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ function MPT:UpdateBosses(Start, count, preview)
538538

539539
end
540540

541-
function MPT:UpdateEnemyForces(Start, preview)
541+
function MPT:UpdateEnemyForces(Start, preview, completion)
542542
-- Current Pull Overlay is only shown in Preview as no API for it is available in midnight
543543
-- If an API is provided I have to add stuff to the else statement below
544544
-- Mostly copy paste from the preview
@@ -622,6 +622,8 @@ function MPT:UpdateEnemyForces(Start, preview)
622622
F.ForcesBar.Completion:Hide()
623623
end
624624
else
625+
percent = completion and 100 or percent
626+
count = completion and total or count
625627
local forcesColor =
626628
(percent < 20 and self.ForcesBar.Color[1]) or
627629
(percent < 40 and self.ForcesBar.Color[2]) or

EventHandler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function MPT:EventHandler(e, ...) -- internal checks whether the event comes fro
116116
self:ToggleEventRegister(false)
117117
elseif e == "CHALLENGE_MODE_COMPLETED" then
118118
self:UpdateTimerBar(false, true)
119-
self:UpdateEnemyForces(false, false)
119+
self:UpdateEnemyForces(false, false, true)
120120
self:SetSV(false, false, false, true)
121121
self:ToggleEventRegister(false)
122122
C_Timer.After(5, function() self:AddCharacterHistory() end) -- add to history 5s delayed to make sure blizzard API has the data

0 commit comments

Comments
 (0)