feat(charsheet): highlight equipped items granting a hovered secondary/tertiary stat - #1789
Open
CrazieJester wants to merge 1 commit into
Open
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:

With:

And on tertiary:

Checklist
highlightSecondaryItems/highlightTertiaryItemsboth defaultfalse;existing users and fresh installs alike see no change until enabled.
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
OnHidehook is a cheap no-op while disabled(iterates an empty table).
no per-frame allocations) -- driven entirely by existing
OnEnter/OnLeavetooltip handlers on the stat rows; a small bounded loop overthe 16 gear slots runs once per hover, not per frame.
HookScript/hooksecurefunconly, neverSetScripton Blizzardframes -- the highlight overlay is our own
CreateFrame, anchored tothe Blizzard slot button via
SetAllPointsbut never scripting it;the character-sheet
OnHidecleanup usesHookScript, notSetScript.uses
C_Item.GetItemStats,GetInventoryItemLink, and the existingEllesmereUI.Glowsmodule only.