Skip to content

Feature(Mythic+ Tools): mplus run summary - #2107

Open
JuJuFX-dev wants to merge 2 commits into
EllesmereGaming:mainfrom
JuJuFX-dev:feature/mplus-run-summary
Open

JuJuFX-dev wants to merge 2 commits into
EllesmereGaming:mainfrom
JuJuFX-dev:feature/mplus-run-summary

Conversation

@JuJuFX-dev

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a Run Summary to Mythic+ Tools: an end-of-key overview panel with one row per party member, plus a per-character history of finished runs. It is off by default and lives on a new "Run Summary" page in the Mythic+ Tools options.

The header shows the dungeon, key level, completion time against the timer, the upgrade or depletion, and total deaths with time lost. Each row shows the spec icon, the class-coloured name with item level, the M+ score with the gain from this run, the looted item, DPS, damage taken, interrupts and deaths. The best DPS and the lowest damage taken are highlighted in the accent colour. Every column except the name can be switched off.

The panel opens once the run's rewards arrive or the loot window closes (Show After Looting), or when leaving the instance if neither happens, and can be reopened at any time with /ov (/ov 2 for the second most recent run, /ov preview for the sample run). A picker in the header switches between the stored runs, listed by dungeon, key level and the local time and date they were played, which are kept per character (5 to 50, default 20) and pruned when a dungeon leaves the season pool. The panel is moved by dragging its header, and Show Preview on the options page opens a sample run so the layout can be checked without running a key.

Where the data comes from, since the combat log is gone in Midnight: the run itself from C_ChallengeMode.GetChallengeCompletionInfo, and damage, damage taken, interrupts and deaths from Blizzard's own C_DamageMeter Overall session, diffed against a sample taken at key start so the figures are right whether or not the Damage Meters module is loaded. Those meter rows stay classified for a while after combat ends (under the Combat or the ChallengeMode restriction), so after completion the run keeps settling until the player leaves the instance: the harvest and the late score push are retried on ADDON_RESTRICTION_STATE_CHANGED, PLAYER_REGEN_ENABLED, CHALLENGE_MODE_MEMBER_INFO_UPDATED and LOOT_CLOSED, and PLAYER_ENTERING_WORLD closes it out. There is no API for another player's score delta, so party gains are the rating summary sampled at key start subtracted from the one after; your own gain is the server's exact value. Item level and spec come from an inspect queue that chains on INSPECT_READY, restarts when a pull ends, keeps going at the chest where the group is out of combat and in range, and rotates by fewest attempts so one player out of range cannot block the rest. Loot is collected from CHALLENGE_MODE_COMPLETED_REWARDS, ENCOUNTER_LOOT_RECEIVED and CHAT_MSG_LOOT together; note that the generated docs describe ENCOUNTER_LOOT_RECEIVED arguments 5 and 6 as itemName/fileName, but BossBannerToast.lua binds them as playerName/className, which is what makes other players' loot readable. Only equippable epic items count as loot; keystones, quest items, housing decor and reagents are skipped. Deaths come from the meter's Deaths type, which returns one row per death rather than a count, so rows are counted per player.

Run records live in a new per-character SavedVariable, EllesmereUIMythicRunsDB, rather than the profile DB, since profile data is exported, imported and stripped as settings.

How was it tested?

Tested in-game on live across several Mythic+ keys: all columns populated for the whole group, including other players' loot, and the history, picker, preview and options behaved as described.

Screenshots

Summary:
mplus overview

Optionpanel:
grafik

Checklist

  • New settings default OFF (no behavior change without opt-in)
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations)
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames
  • Tested in-game on live; no version gates or pre-Midnight APIs added

Records every finished Mythic+ key and shows an overview panel with one row per
party member: spec icon, class-coloured name with item level, M+ score with the
gain from the run, looted item, DPS, damage taken, interrupts and deaths, with
the best DPS and the lowest damage taken highlighted. The header carries the
dungeon, key level, time against the timer, upgrade or depletion and deaths.
A picker switches between the stored runs, /ov reopens them, the panel is
moved by dragging its header, and a preview shows a sample run. Off by default.

Data sources, since the combat log is gone in Midnight. The run comes from
C_ChallengeMode.GetChallengeCompletionInfo. Per-player combat numbers come from
C_DamageMeter's Overall session, diffed against a sample taken at key start so
they are right whether or not the Damage Meters module is loaded. Party score
gain has no API, so it is the rating summary sampled at key start subtracted
from the one after; our own gain is the server's value. Item level and spec come
from an inspect queue that runs through the key and at the chest. Loot is read from the rewards payload,
ENCOUNTER_LOOT_RECEIVED and CHAT_MSG_LOOT together; the generated docs describe
ENCOUNTER_LOOT_RECEIVED arguments 5 and 6 as itemName and fileName, but
BossBannerToast binds them as playerName and className, which is what makes
other players' loot readable. Only equippable epic items count;
keystones, quest items, housing decor and reagents are skipped. Deaths are
counted from the meter's per-death rows.

The meter rows stay classified for a while after combat, under either the
Combat or the ChallengeMode restriction. After completion the run keeps
settling until we leave the instance, retrying the harvest and the late score
push on ADDON_RESTRICTION_STATE_CHANGED, PLAYER_REGEN_ENABLED,
CHALLENGE_MODE_MEMBER_INFO_UPDATED and LOOT_CLOSED, with PLAYER_ENTERING_WORLD
closing it out. The inspect queue chains on INSPECT_READY and restarts when a
pull ends. There are no timers and no OnUpdate; every registration is derived
from state in one place, and nothing is registered or built while disabled.

Secret values are guarded on every read, including walking the source list
inside pcall since type() reports a secret table as a table. Unit tokens are
checked against the recorded GUID before reuse, since the group can reshuffle
after the key.

Run records live in a new per-character SavedVariable, EllesmereUIMythicRunsDB,
rather than the profile DB, which is exported, imported and stripped as
settings. History is capped and pruned when a dungeon leaves the season pool.
New Run Summary page in the Mythic+ Tools options: enable (off by default),
Show After Looting, history size and panel scale, a Columns section with Show
Spec Icons and a toggle per column, and Show Preview and Clear Run History
buttons. Column and scale changes repaint an open panel.
@JuJuFX-dev
JuJuFX-dev force-pushed the feature/mplus-run-summary branch from 530b59d to 42fcac6 Compare September 16, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant