Skip to content

Nameplates: apply the configured outline to friendly player names (fixes #1653) - #2081

Open
Laxxzz wants to merge 1 commit into
EllesmereGaming:mainfrom
Laxxzz:claude/4c374c6aeb14-nameplates-friendly-outline
Open

Laxxzz wants to merge 1 commit into
EllesmereGaming:mainfrom
Laxxzz:claude/4c374c6aeb14-nameplates-friendly-outline

Conversation

@Laxxzz

@Laxxzz Laxxzz commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Friendly player names in Name Only mode now render with the outline configured
in EUI's font settings. Previously they always rendered without one, while the
friendly NPC overlays next to them honoured the setting.

ApplyFriendlyFontOverride read the flags back off SystemFont_NamePlate /
SystemFont_NamePlate_Outlined and only fell through to GetNPOutline() when
they were nil:

local _, _, flags = SystemFont_NamePlate:GetFont()
SystemFont_NamePlate:SetFont(font, size, flags or GetNPOutline())

Blizzard's stock font objects always carry non-nil flags, so the or never
reached the setting and the configured outline was silently dropped. The NPC
overlay path (ShowNPCOverlay) calls GetNPOutline() directly, which is why
NPC names were fine and player names were not.

Now stamps GetNPOutline() on both font objects directly, and folds the flags
into the existing file/size stamp so an outline change re-applies instead of
being skipped as unchanged. Same cost profile as before: one SetFont per
object, only when file, size or flags actually differ.

Fixes #1653

How was it tested?

Live 12.1 client, build 9.1.8, Name Only mode with Show Friendly NPC Nameplates
on as a control group, Outline Mode set to Outline.

  • Before: friendly player names rendered with no outline; NPC names beside them
    had one.
  • After: player names carry the same outline as the NPC names.
  • Outline Mode set to None and reloaded: player names drop the outline as well.

Screenshots

Before:

image

After:
image

Checklist

  • New settings default OFF (no behavior change without opt-in) - N/A, no new setting; the outline setting already exists and this makes it apply where it was documented to
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built - unchanged; the function only runs in Name Only mode as before
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) - one extra string compare in the existing stamp check
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames - N/A, touches the shared font objects the same way the existing code already did
  • Tested in-game on live; no version gates or pre-Midnight APIs added
    🤖 Generated with Claude Code

In name-only mode, ApplyFriendlyFontOverride read the flags back off
SystemFont_NamePlate / SystemFont_NamePlate_Outlined and only fell through
to GetNPOutline() when they were nil. Blizzard's stock font objects always
carry non-nil flags, so the configured outline was never applied: friendly
player names kept Blizzard's flags while the friendly NPC overlays, which
call GetNPOutline() directly, honoured the setting.

Stamp GetNPOutline() on both font objects directly, and fold the flags
into the file/size stamp so an outline change re-applies instead of being
skipped as unchanged.

Fixes EllesmereGaming#1653

Co-Authored-By: Claude Opus 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.

Friendly player nameplates ignore outline setting (flags or GetNPOutline() short-circuits)

1 participant