PowerBarAlt
Nimaear opened this issue ยท 8 comments
Adding the new PowerBarAlt as seen in different encounters (Onyxia in Blackwing Descent, Atramedes in Blackwing Descent) as well as in a quest in Twilight highlands would be appreciated.
Haven't done very extensive testing, but this seems to be not functional on both the Maw of Darkness and Onyxia.
(Tried both with my own layout as well as the new oUF lily). No errors thrown but no alternate power bar either.
Also don't forget that the PowerBarAlt has different names depending on its unit
I am using
local FrameToHide = _G[unit:sub(1,1):upper()..unit:sub(2).."PowerBarAlt"]
if (FrameToHide) then
FrameToHide:RegisterEvent'UNIT_POWER_BAR_SHOW'
FrameToHide:RegisterEvent'UNIT_POWER_BAR_HIDE'
FrameToHide:RegisterEvent'PLAYER_ENTERING_WORLD'
end
instead of
PlayerPowerBarAlt:RegisterEvent'UNIT_POWER_BAR_SHOW'
PlayerPowerBarAlt:RegisterEvent'UNIT_POWER_BAR_HIDE'
PlayerPowerBarAlt:RegisterEvent'PLAYER_ENTERING_WORLD'
Since these can be on bossframes, targetframes, focus frames, etc
The only extra frames it can be on are the party frames and the target frame. I've added a note in my local todo list, but haven't done any more work on it.
ah damn, was mainly checking file names. Most of them are connected to the unit frames however, so they won't actually be shown. What we mainly have to do is disable their event handling when we kill the default frames.
The player frames is a special case however, so it will have remain in the element.
This should be handled with a2da859. The code for the player version remains in the element, as it works more like a separate entity.