Skip to content

Fix: NPC name text not repainting on hostility change - #2080

Open
svart2521 wants to merge 1 commit into
EllesmereGaming:mainfrom
svart2521:npc-name-color-not-changing-when-hostility-changes
Open

svart2521 wants to merge 1 commit into
EllesmereGaming:mainfrom
svart2521:npc-name-color-not-changing-when-hostility-changes

Conversation

@svart2521

Copy link
Copy Markdown
Contributor

Bug: https://discord.com/channels/585577383847788554/1547242657347145728

When a unit frame's name/target text zone is set to class-colored, the text stays at its old color when the unit's hostility flips (friendly -> hostile etc). The health bar recolors correctly at the same moment.

Issue: The "text" channel in EUI_UnitFrames_Engine.lua's CHANNEL_EVENTS table (which drives PaintText, the painter that calls ApplyClassColor on name/target text zones via ns.ResolveUnitNameColor) never listed UNIT_FACTION, unlike the "health" channel. UNIT_FACTION was already treated as an always-deliver identity event (IDENTITY_EVENTS), so the engine was already built to route it to any channel that asked for it -- text just never asked.

Fix: Added UNIT_FACTION to the "text" channel's event list, so name/target text repaints on the same reaction-change edge the health bar already uses.

Bug:

When a unit frame's name/target text zone is set to class-colored,
the text stays at its old color when the unit's hostility flips
(friendly -> hostile etc). The health bar recolors correctly at the
same moment.

Issue:

The "text" channel in EUI_UnitFrames_Engine.lua's CHANNEL_EVENTS
table (which drives PaintText, the painter that calls ApplyClassColor
on name/target text zones via ns.ResolveUnitNameColor) never listed
UNIT_FACTION, unlike the "health" channel. UNIT_FACTION was already
treated as an always-deliver identity event (IDENTITY_EVENTS), so the
engine was already built to route it to any channel that asked for
it -- text just never asked.

Fix:

Added UNIT_FACTION to the "text" channel's event list, so name/target
text repaints on the same reaction-change edge the health bar already
uses.
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