Skip to content

Commit

Permalink
https://github.com/oUF-wow/oUF/pull/691
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 20, 2024
1 parent c1b3ce1 commit 48c7de1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ElvUI_Libraries/Core/oUF/elements/portrait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 48c7de1

Please sign in to comment.