Skip to content

Commit

Permalink
[Bugfix] Fix Power Bar Filter check getting caught in race case for "…
Browse files Browse the repository at this point in the history
…player" unit
  • Loading branch information
Krealle committed Feb 11, 2025
1 parent e97710f commit ea83d7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Widgets/Bars/PowerBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ local function GetRole(button)
local role
local info = LGI and LGI:GetCachedInfo(button.states.guid)

if info then
if button.states.unit == "player" then
local classID = select(2, UnitClassBase("player"))
if classID then
role = select(5, GetSpecializationInfoForClassID(classID, GetSpecialization()))
end
elseif info then
role = info.role
else
role = UnitGroupRolesAssigned(button.states.unit)
Expand Down

0 comments on commit ea83d7c

Please sign in to comment.