I created a little power bar that fits my unit frames and UI, but feel free to modify it to your own needs.
This should cover all the known bosses/quests that use the alt power bar as well as it's function and value.
(Add under shared stuff)
*EDIT*
Oh, and tested and works! :P
lua Code:
-- alt power bar
local AltPowerBar = CreateFrame("StatusBar", nil, self)
AltPowerBar:SetWidth(cfg.widthF)
AltPowerBar:SetHeight(17)
AltPowerBar:SetStatusBarTexture(settings.texture)
AltPowerBar:SetStatusBarColor(1,0,0)
AltPowerBar:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, 226)
AltPowerBar.bd = SetBD(AltPowerBar, backdrop, {0.17, 0.17, 0.17, 1})
AltPowerBar.type = AltPowerBar:CreateFontString(nil, "OVERLAY")
AltPowerBar.type:SetFontObject(cfg.Font)
AltPowerBar.type:SetText("")
AltPowerBar.type:SetPoint("LEFT",4,0)
AltPowerBar.value = AltPowerBar:CreateFontString(nil, "OVERLAY")
AltPowerBar.value:SetFontObject(cfg.Font)
AltPowerBar.value:SetJustifyH("RIGHT")
AltPowerBar.value:SetPoint("RIGHT",-2,0)
AltPowerBar.value:SetText("")
AltPowerBar:RegisterEvent("UNIT_POWER")
--AltPowerBar:RegisterEvent("PLAYER_ENTERING_WORLD")
AltPowerBar:SetScript("OnEvent", function(self,event,...)
alternatePower = UnitPower("player", ALTERNATE_POWER_INDEX)
ZoneName = GetRealZoneText()
subZoneName = GetSubZoneText()
if alternatePower >= 0 then
AltPowerBar.value:SetText(alternatePower)
else
AltPowerBar.value:SetText(0)
end
if ZoneName == "Twilight Highlands" then -- Iso'Rath Quest (Maw of Madness)
AltPowerBar:SetStatusBarColor(0.5,0.8,0.3)
AltPowerBar.type:SetText("DIGESTION")
elseif ZoneName == "The Bastion of Twilight" then -- Cho'Gall
AltPowerBar:SetStatusBarColor(0.5,0,1)
AltPowerBar.type:SetText("CORRUPTION")
elseif ZoneName == "Blackwing Descent" then -- Atramedes and Nefarion
if subZoneName == "The Athenaeum" then
AltPowerBar:SetStatusBarColor(0,0.5,1)
AltPowerBar.type:SetText("SOUNDLVL")
else --elseif subZoneName == "Vault of the Shadowflame" --Onyxia Rage
AltPowerBar:SetStatusBarColor(0,0.5,1)
AltPowerBar.type:SetText("ONYRAGE")
end
end
end)