Skip to content

Commit 7879474

Browse files
committed
fix extra objective in Pit of Saron
1 parent d51f9d0 commit 7879474

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Data.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ MPT.DefaultProfile = {
339339
enabled = true,
340340
Anchor = "LEFT",
341341
RelativeTo = "LEFT",
342-
MaxLength = 20,
342+
MaxLength = 22,
343343
xOffset = 2,
344344
yOffset = 0,
345345
Font = "Expressway",

Display.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,11 @@ function MPT:UpdateBosses(Start, count, preview)
453453
elseif i < select(3, C_Scenario.GetStepInfo()) and not self.opened then
454454
EncounterJournal_OpenJournal(23, instanceID)
455455
EJ_SelectInstance(instanceID)
456-
self.opened = true
457456
HideUIPanel(EncounterJournal)
458457
local name = EJ_GetEncounterInfoByIndex(i, instanceID)
459458
if name then
460459
self.BossNames[i] = name
460+
self.opened = true
461461
end
462462
else
463463
break
@@ -478,6 +478,7 @@ function MPT:UpdateBosses(Start, count, preview)
478478
for i=1, max do
479479
-- manually offset which bossname we want for megadungeons
480480
local num = (self.cmap == 370 and i+4) or (self.cmap == 392 and i+5) or (self.cmap == 227 and i+2) or (self.cmap == 234 and i+6) or (self.cmap == 464 and i+4) or i
481+
num = (self.cmap == 556 and i == 4 and 3) or num -- Looking for 3rd Boss in 4th Objective for Pit of Saron
481482
-- limit how many bosses to show for some of the lower parts of megadungeons
482483
local maxbosses = (self.cmap == 391 and 5) or (self.cmap == 463 and 4) or (self.cmap == 227 and 3) or (self.cmap == 369 and 4)
483484
local name = self.BossNames[num]
@@ -488,6 +489,7 @@ function MPT:UpdateBosses(Start, count, preview)
488489
break
489490
end
490491
end
492+
if self.cmap == 556 and i == 3 then name = criteria.description end -- Using Blizzard's name for "Quarry camps liberated" since there is no other translated version to use
491493
if self.cmap == 227 and num == 3 then name = "Opera Hall" end
492494
if name and name ~= "" and ((not maxbosses) or i <= maxbosses) then
493495
name = self:Utf8Sub(name, 1, self.BossName.MaxLength)
@@ -509,6 +511,8 @@ function MPT:UpdateBosses(Start, count, preview)
509511
local time = completed and select(2, GetWorldElapsedTime(1))-defeated or pb2[i]
510512
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
511513
self:ApplyTextSettings(frame["BossTimer"..i], self.BossTimer, self:FormatTime(time), timercolor)
514+
elseif self.cmap == 556 and i == 3 then -- Pit of Saron Quarry liberated display
515+
self:ApplyTextSettings(frame["BossTimer"..i], self.BossTimer, criteria.quantityString.."/"..criteria.totalQuantity, BossColor)
512516
end
513517
if completed and defeated and pb and pb[i] then
514518
local time = select(2, GetWorldElapsedTime(1))-defeated or 0
@@ -542,7 +546,7 @@ function MPT:UpdateBosses(Start, count, preview)
542546
if C_ScenarioInfo.GetCriteriaInfo(max) and C_ScenarioInfo.GetCriteriaInfo(max).isWeightedProgress then max = max-1 end
543547
local pb = self.BossSplit.enabled and self:GetPB(self.cmap, self.level, self.seasonID, self.LowerKey)
544548
for i=1, max do
545-
local criteria = C_ScenarioInfo.GetCriteriaInfo(i)
549+
local criteria = C_ScenarioInfo.GetCriteriaInfo(i)
546550
if criteria.completed then
547551
local frame = self:CreateBossFrame(i)
548552
local defeated = criteria.elapsed
@@ -562,6 +566,8 @@ function MPT:UpdateBosses(Start, count, preview)
562566
if diff < 0 then diff = diff*-1 end
563567
self:ApplyTextSettings(frame["BossSplit"..i], self.BossSplit, prefix..self:FormatTime(diff), splitcolor)
564568
end
569+
elseif self.cmap == 556 and i == 3 then -- Quarry Camps in Pit of Saron
570+
self:ApplyTextSettings(frame["BossTimer"..i], self.BossTimer, criteria.quantityString.."/"..criteria.totalQuantity, self.BossName.Color)
565571
end
566572
end
567573
end

0 commit comments

Comments
 (0)