View Single Post
07-09-11, 07:39 PM   #15
Necrophgst
A Deviate Faerie Dragon
 
Necrophgst's Avatar
Join Date: Apr 2008
Posts: 17
Gosh that's all kinds of confusing... Let try it using Luatext's... I believe you'll find this runs just a tad bit faster.

Try this for HPColor:
Code:
local curHP, maxHP = HPUnit(unit), MaxHP(unit)
local hpR, hpG, hpB = HPColor(curHP, maxHP)
local hpDif = maxHP - curHP
return "|cff%02x%02x%02x%s", hpR, hpG, hpB, Short(hpDif, true)
Try this power color...
Code:
local powType, maxPow, curPow = UnitPowerType(unit), MaxPower(unit), Power(unit)
local powR, powG, powB = PowerColor(powType)
local powDif = maxPow - curPow
return "|cff%02x%02x%02x%s", powR, powG, powB, Short(powDif, true)
__________________
The beat goes, Boom Badda Bing

Last edited by Necrophgst : 07-09-11 at 07:44 PM.
  Reply With Quote