From 4a19d372a62bd2bce5cee882153f53e5f26f3dc7 Mon Sep 17 00:00:00 2001 From: "vjekoslav.krenek@gmail.com" <313787825+svart2521@users.noreply.github.com> Date: Sun, 13 Sep 2026 23:34:38 +0200 Subject: [PATCH] Fix: NPC name text not repainting on hostility change 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. --- EllesmereUIUnitFrames/EUI_UnitFrames_Engine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EllesmereUIUnitFrames/EUI_UnitFrames_Engine.lua b/EllesmereUIUnitFrames/EUI_UnitFrames_Engine.lua index fbd1187bd..49d8217eb 100644 --- a/EllesmereUIUnitFrames/EUI_UnitFrames_Engine.lua +++ b/EllesmereUIUnitFrames/EUI_UnitFrames_Engine.lua @@ -66,7 +66,7 @@ local CHANNEL_EVENTS = { -- exactly that moment. (The "Short" variants ride the Override's -- _absGate lockstep instead, which the absorb channel already covers.) text = { "UNIT_HEALTH", "UNIT_MAXHEALTH", "UNIT_POWER_UPDATE", "UNIT_MAXPOWER", "UNIT_DISPLAYPOWER", - "UNIT_NAME_UPDATE", "UNIT_LEVEL", "UNIT_CONNECTION", + "UNIT_NAME_UPDATE", "UNIT_LEVEL", "UNIT_CONNECTION", "UNIT_FACTION", "UNIT_ABSORB_AMOUNT_CHANGED", "UNIT_HEAL_ABSORB_AMOUNT_CHANGED", "UNIT_MAX_HEALTH_MODIFIERS_CHANGED" }, -- (UNIT_HEAL_PREDICTION deliberately absent: the absorb painter never