Woops, try this:
Code:
local color
local pType, pToken, altR, altG, altB = UnitPowerType(unit)
local pCur, pMax, pCurMana, pMaxMana = Power(unit), MaxPower(unit), Power(unit, 0), MaxPower(unit, 0)
if (pMax > 0) then
if PitBull4.PowerColors[pToken] then
color = PitBull4.PowerColors[pToken]
else
if (altR == nil) then
color = PitBull4.PowerColors["MANA"]
else
color = {[1] = altR, [2] = altG, [3] = altB}
end
end
if (pToken ~= "MANA") and (pMaxMana > 0) then
local DManaColor = PitBull4.PowerColors["MANA"]
return "|cff%02x%02x%02x%s |cff%02x%02x%02x%s", color[1]*255, color[2]*255, color[3]*255, Short(pCur, true), DManaColor[1]*255, DManaColor[2]*255, DManaColor[3]*255, Short(pCurMana, true)
else
return "|cff%02x%02x%02x%s", color[1]*255, color[2]*255, color[3]*255, Short(pCur, true)
end
end
Yep, you should get two power bars, and two power texts. I.e. In cat form, it'll be Energy and Mana.