>wowhelm_
Loading ruleset status…
~/forever/addon-api/source/1.60.1.70755

Interface/AddOns/Blizzard_InspectUI/Mainline/InspectPaperDollFrame.lua

1.60.1.70755 compared with 1.60.1.70707 · 2026-11-03 · +7 −1· view file
@@ -3,6 +3,7 @@ InspectPaperDollFrameMixin = {};
function InspectPaperDollFrameMixin:OnLoad()
self:RegisterEvent("UNIT_MODEL_CHANGED");
self:RegisterEvent("UNIT_LEVEL");
+ self:RegisterEvent("UNIT_NAME_UPDATE");
self:RegisterEvent("INSPECT_READY");
self:RegisterForTransitions();
@@ -13,7 +14,7 @@ function InspectPaperDollFrameMixin:OnEvent(event, unit)
if ( unit and unit == InspectFrame.unit ) then
if ( event == "UNIT_MODEL_CHANGED" ) then
InspectModelFrame:RefreshUnit();
- elseif ( event == "UNIT_LEVEL" ) then
+ elseif ( event == "UNIT_LEVEL" or event == "UNIT_NAME_UPDATE" ) then
self:SetLevel();
end
return;
@@ -34,6 +35,11 @@ function InspectPaperDollFrameMixin:SetLevel()
local specID = C_SpecializationInfo.GetInspectSpecialization(InspectFrame.unit);
local classDisplayName, class = UnitClass(InspectFrame.unit);
+ if (not class) then
+ InspectLevelText:SetText("");
+ return;
+ end
+
local classColorString = RAID_CLASS_COLORS[class].colorStr;
local specName, _;