Skip to content

Commit 4a2ab5d

Browse files
committed
History range now includes dungeon encounters in addition to the existing raid encounters
1 parent bb36473 commit 4a2ab5d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

AddonProfiler.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ function NAP:PLAYER_REGEN_ENABLED()
548548
end
549549

550550
function NAP:ENCOUNTER_START(encounterID, encounterName, difficultyID, _)
551-
if (select(2, GetDifficultyInfo(difficultyID)) ~= 'raid') then return; end
551+
local instanceType = select(2, GetDifficultyInfo(difficultyID));
552+
if (instanceType ~= 'raid' and instanceType ~= 'party') then return; end
552553
if self.db.mode == MODE_PERFORMANCE then
553554
self.encounterPeakMs = { [TOTAL_ADDON_METRICS_KEY] = 0 };
554555
end
@@ -561,7 +562,8 @@ function NAP:ENCOUNTER_START(encounterID, encounterName, difficultyID, _)
561562
end
562563

563564
function NAP:ENCOUNTER_END(encounterID, _, difficultyID, _, success)
564-
if (select(2, GetDifficultyInfo(difficultyID)) ~= 'raid') then return; end
565+
local instanceType = select(2, GetDifficultyInfo(difficultyID));
566+
if (instanceType ~= 'raid' and instanceType ~= 'party') then return; end
565567
local snapshot = self.encounterSnapshots[#self.encounterSnapshots];
566568
if not snapshot or snapshot.encounterID ~= encounterID then
567569
self:Print('Encounter ended without matching encounter start');
@@ -1611,8 +1613,8 @@ function NAP:InitUI()
16111613
option:SetEnabled(timeRangeTypeAllowed);
16121614
end
16131615

1614-
local encounter = rootDescription:CreateRadio("Raid Encounters", isTypeSelected, selectType, HISTORY_TYPE_ENCOUNTER);
1615-
encounter:SetTitleAndTextTooltip("Raid Encounters", "Show addon performance during a raid fight.");
1616+
local encounter = rootDescription:CreateRadio("Encounters", isTypeSelected, selectType, HISTORY_TYPE_ENCOUNTER);
1617+
encounter:SetTitleAndTextTooltip("Encounters", "Show addon performance during a raid/dungeon fight.");
16161618
local latestIndex = #NAP.encounterSnapshots;
16171619
if NAP.encounterSnapshots[latestIndex] and not NAP.encounterSnapshots[latestIndex].snapshot.isComplete then -- encounter is still in progress
16181620
latestIndex = latestIndex - 1;

0 commit comments

Comments
 (0)