From 48c7de147aa9b0f8bf310d158751db53d6f6cbba Mon Sep 17 00:00:00 2001 From: Simpy Date: Wed, 20 Nov 2024 18:58:05 -0500 Subject: [PATCH] https://github.com/oUF-wow/oUF/pull/691 --- ElvUI_Libraries/Core/oUF/elements/portrait.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ElvUI_Libraries/Core/oUF/elements/portrait.lua b/ElvUI_Libraries/Core/oUF/elements/portrait.lua index 13e4c41796..ec06a09355 100644 --- a/ElvUI_Libraries/Core/oUF/elements/portrait.lua +++ b/ElvUI_Libraries/Core/oUF/elements/portrait.lua @@ -43,7 +43,7 @@ local oUF = ns.oUF local UnitGUID = UnitGUID local UnitIsConnected = UnitIsConnected local UnitIsVisible = UnitIsVisible -local UnitClassBase = UnitClassBase +local UnitClass = UnitClass -- end block local function Update(self, event) @@ -90,9 +90,12 @@ local function Update(self, event) element:SetUnit(unit) end elseif element.useClassBase then - local classBase = UnitClassBase(unit) - if classBase then - element:SetAtlas('classicon-' .. classBase) + -- BUG: UnitClassBase can't be trusted + -- https://github.com/Stanzilla/WoWUIBugs/issues/621 + + local _, className = UnitClass(unit) + if className then + element:SetAtlas('classicon-' .. className) end end end