This is my PostUpdate code for classpower
lua Code:
local function PostUpdateClassPower(element, cur, max, hasMaxChanged, powerType)
local style = element.__owner.unitStyle
local gap = 3
local maxWidth
if style == 'player' then
maxWidth = C.DB.unitframe.player_width
else
maxWidth = C.DB.nameplate.pp_width
end
if hasMaxChanged then
for i = 1, max do
element[i]:SetWidth((maxWidth - (max - 1) * gap) / max)
end
element[max]:SetStatusBarColor(unpack(lastBarColors[C.MyClass]))
end
end
When I log into the game for the first time
After /reload it returns to normal
Dose anyone konw the reason?