Skip to content

Commit

Permalink
portrait: Use UnitClass to get accurate info on AI players (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim authored Nov 30, 2024
1 parent 69b0657 commit b41046b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion elements/portrait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ local function Update(self, event, unit)
element:SetUnit(unit)
end
else
local class = element.showClass and UnitClassBase(unit)
local class, _
if(element.showClass) then
-- BUG: UnitClassBase can't be trusted
-- https://github.com/Stanzilla/WoWUIBugs/issues/621
_, class = UnitClass(unit)
end

if(class) then
element:SetAtlas('classicon-' .. class)
else
Expand Down

0 comments on commit b41046b

Please sign in to comment.