[quote=Nibelheim;239706]Some examples:
Power (supports Druid Mana and Alt Power types)
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 (not altR) then
color = PitBull4.PowerColors["MANA"]
else
color = {[1] = altR, [2] = altG, [3] = altB}
end
end
if (pToken ~= "MANA") then
if (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)
end
else
return "|cff%02x%02x%02x%s", color[1]*255, color[2]*255, color[3]*255, Short(pCur, true)
end
end
Is it possible to make this code show as "current insted of short" f.ex show mana aka power as 32000 insted of 32.0k ?