diff --git a/.luacheckrc b/.luacheckrc index 9a255e1c..0d369169 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -181,6 +181,7 @@ read_globals = { "CombatFeedback_OnUpdate", "CompactRaidFrameManager_GetSetting", "CompactRaidFrameManager_SetSetting", + "GetClassAtlas", "RegisterStateDriver", "RegisterUnitWatch", "SecureButton_GetModifiedUnit", diff --git a/modules/portrait.lua b/modules/portrait.lua index 48af4ac8..9582e52c 100755 --- a/modules/portrait.lua +++ b/modules/portrait.lua @@ -65,8 +65,12 @@ function Portrait:Update(frame, event) if( type == "class" ) then local classToken = frame:UnitClassToken() if( classToken ) then - frame.portrait:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes") - frame.portrait:SetTexCoord(CLASS_ICON_TCOORDS[classToken][1], CLASS_ICON_TCOORDS[classToken][2], CLASS_ICON_TCOORDS[classToken][3], CLASS_ICON_TCOORDS[classToken][4]) + local classIconAtlas = GetClassAtlas(classToken) + if( classIconAtlas ) then + frame.portrait:SetAtlas(classIconAtlas) + else + frame.portrait:SetTexture("") + end else frame.portrait:SetTexture("") end