@@ -8264,6 +8264,10 @@ function DF:ProcessRosterUpdate()
82648264 local function refreshName (frame )
82658265 if frame .unit then
82668266 DF :UpdateName (frame )
8267+ -- TD mirrors this legacy safety net: refresh identity text on
8268+ -- every roster change so TD names don't go stale/duplicate when
8269+ -- the secure header reshuffles frames (the per-frame path misses some).
8270+ if DF .UpdateTextDesigner then DF :UpdateTextDesigner (frame , " name" ) end
82678271 end
82688272 end
82698273 DF :IteratePartyFrames (refreshName )
@@ -8573,6 +8577,7 @@ local headerChildEventFrame = CreateFrame("Frame")
85738577headerChildEventFrame :RegisterEvent (" UNIT_HEALTH" )
85748578headerChildEventFrame :RegisterEvent (" UNIT_MAXHEALTH" )
85758579headerChildEventFrame :RegisterEvent (" UNIT_NAME_UPDATE" )
8580+ headerChildEventFrame :RegisterEvent (" UNIT_LEVEL" )
85768581headerChildEventFrame :RegisterEvent (" UNIT_POWER_UPDATE" )
85778582headerChildEventFrame :RegisterEvent (" UNIT_MAXPOWER" )
85788583headerChildEventFrame :RegisterEvent (" UNIT_DISPLAYPOWER" )
@@ -8772,6 +8777,17 @@ headerChildEventFrame:SetScript("OnEvent", function(self, event, arg1)
87728777 end
87738778 return
87748779 end
8780+
8781+ -- UNIT_LEVEL: refresh TextDesigner identity text (the "level" element).
8782+ -- TD-only — the legacy frames don't show a live level, so there's no
8783+ -- existing update function to call here. No-op without the TD module.
8784+ if event == " UNIT_LEVEL" then
8785+ local unit = arg1
8786+ if unit and DF .UpdateTextDesigner then
8787+ tdRefresh (unitFrameMap [unit ], FindPinnedFrameForUnit (unit ), " name" )
8788+ end
8789+ return
8790+ end
87758791
87768792 -- UNIT_CONNECTION: Full frame update (handles offline state)
87778793 if event == " UNIT_CONNECTION" then
@@ -8803,6 +8819,11 @@ headerChildEventFrame:SetScript("OnEvent", function(self, event, arg1)
88038819 end
88048820 end
88058821
8822+ -- TD: UpdateUnitFrame early-returns on the offline branch before the
8823+ -- TD "all" hook, so refresh TD directly here. "all" because a
8824+ -- connection change flips status text + health/power value hiding.
8825+ tdRefresh (frame , pinnedFrame , " all" )
8826+
88068827 -- Delayed re-check: UnitIsConnected may not return the updated
88078828 -- state immediately, and the map rebuild throttle (1s) can cause
88088829 -- the reconnect event to miss. Schedule a follow-up that bypasses
@@ -8826,6 +8847,7 @@ headerChildEventFrame:SetScript("OnEvent", function(self, event, arg1)
88268847 local stale = (frameThinks == nil ) or (isConnected ~= frameThinks )
88278848 if stale and DF .UpdateUnitFrame then
88288849 DF :UpdateUnitFrame (recheckFrame )
8850+ if DF .UpdateTextDesigner then DF :UpdateTextDesigner (recheckFrame , " all" ) end
88298851 end
88308852 end
88318853 -- Also re-check pinned frame
@@ -8835,6 +8857,7 @@ headerChildEventFrame:SetScript("OnEvent", function(self, event, arg1)
88358857 local stale = (frameThinks == nil ) or (isConnected ~= frameThinks )
88368858 if stale and DF .UpdateUnitFrame then
88378859 DF :UpdateUnitFrame (recheckPinned )
8860+ if DF .UpdateTextDesigner then DF :UpdateTextDesigner (recheckPinned , " all" ) end
88388861 end
88398862 end
88408863 end )
@@ -9094,13 +9117,15 @@ headerChildEventFrame:SetScript("OnEvent", function(self, event, arg1)
90949117 -- NOTE: If more frame elements get stuck after vehicle swaps
90959118 -- (role icon, power bar type, etc.), consider a broader refresh here.
90969119 if DF .UpdateName then DF :UpdateName (frame ) end
9120+ if DF .UpdateTextDesigner then DF :UpdateTextDesigner (frame , " name" ) end
90979121 end
90989122 local pinnedFrame = FindPinnedFrameForUnit (unit )
90999123 if pinnedFrame then
91009124 DF :UpdateVehicleIcon (pinnedFrame )
91019125 if DF .UpdateAuras_Enhanced then DF :UpdateAuras_Enhanced (pinnedFrame ) end
91029126 if DF .UpdateDefensiveBar then DF :UpdateDefensiveBar (pinnedFrame ) end
91039127 if DF .UpdateName then DF :UpdateName (pinnedFrame ) end
9128+ if DF .UpdateTextDesigner then DF :UpdateTextDesigner (pinnedFrame , " name" ) end
91049129 end
91059130 end
91069131 end
0 commit comments