Skip to content

feat(charsheet): highlight equipped items granting a hovered secondary/tertiary stat - #1789

Open
CrazieJester wants to merge 1 commit into
EllesmereGaming:mainfrom
CrazieJester:feat/charsheet-stat-item-highlight
Open

feat(charsheet): highlight equipped items granting a hovered secondary/tertiary stat#1789
CrazieJester wants to merge 1 commit into
EllesmereGaming:mainfrom
CrazieJester:feat/charsheet-stat-item-highlight

Conversation

@CrazieJester

@CrazieJester CrazieJester commented Aug 27, 2026

Copy link
Copy Markdown

What does this PR do?

Adds an opt-in hover highlight on the character sheet: hovering a secondary
stat (Critical Strike, Haste, Mastery, Versatility) or tertiary stat (Leech,
Avoidance, Speed) row now glows the equipped item slots that are actually
granting that stat, using the same Glows highlight already used to spotlight
a slot from the socket panel. Two new toggles are added under Stat Display
settings (Secondary Stats / Tertiary Stats cog popups): "Highlight Items"
and "Highlight Tertiary Items" -- both default OFF.

How was it tested?

Tested in-game on live: toggled both settings on/off, hovered each secondary
and tertiary stat with a mix of geared/ungeared slots, confirmed the correct
slots glow and clear on mouse-leave, and confirmed closing the character
sheet mid-hover clears the glow instead of leaking it.

Screenshots

Without highlighting:
image

With:
image

And on tertiary:
image

Checklist

  • New settings default OFF (no behavior change without opt-in) --
    highlightSecondaryItems / highlightTertiaryItems both default false;
    existing users and fresh installs alike see no change until enabled.
  • Zero cost while disabled: no events registered, no polling, no hooks
    doing work, no frames built -- the highlight frames are created lazily,
    only the first time a matching stat is hovered while the setting is on.
    The one unconditional OnHide hook is a cheap no-op while disabled
    (iterates an empty table).
  • Cheap while enabled: event-driven (no polling, no timer-based logic,
    no per-frame allocations) -- driven entirely by existing OnEnter/
    OnLeave tooltip handlers on the stat rows; a small bounded loop over
    the 16 gear slots runs once per hover, not per frame.
  • No writes onto Blizzard-owned frames (weak-table pattern used);
    HookScript/hooksecurefunc only, never SetScript on Blizzard
    frames -- the highlight overlay is our own CreateFrame, anchored to
    the Blizzard slot button via SetAllPoints but never scripting it;
    the character-sheet OnHide cleanup uses HookScript, not SetScript.
  • Tested in-game on live; no version gates or pre-Midnight APIs added --
    uses C_Item.GetItemStats, GetInventoryItemLink, and the existing
    EllesmereUI.Glows module only.

…y/tertiary stat

Hovering a secondary (Crit/Haste/Mastery/Versatility) or tertiary
(Leech/Avoidance/Speed) stat row in the character sheet now glows the
equipped item slots contributing that stat, via the existing Glows
system already used by the socket panel. Opt-in, off by default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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