this might help abit..
<Health Sphere>
On Event:
if arg1=="player" then
if UnitHealthMax("player")==0 then return; end
local p=UnitHealth("player")/UnitHealthMax("player")-0.05;
local h = 256 * p;
local t="Interface\\AddOns\\DiscordArt\\CustomTextures\\health_sphere";
DART_Height(ti, h);
DART_Texture(ti, t, {0,1,1-p,1});
end
On Load:
this:RegisterEvent("UNIT_HEALTH");
<Mana Sphere>
On Event:
if arg1=="player" then
if UnitManaMax("player")==0 then return; end
local p=UnitMana("player")/UnitManaMax("player");
local h = 256 * p;
local t="Interface\\AddOns\\DiscordArt\\CustomTextures\\mana_sphere";
DART_Height(ti, h);
DART_Texture(ti, t, {0,1,1-p,1});
DART_Text(ti,UnitMana("player"));
end
On Load:
this:RegisterEvent("UNIT_MANA");
this:RegisterEvent("UNIT_RAGE");
this:RegisterEvent("UNIT_FOCUS");
this:RegisterEvent("UNIT_ENERGY");
That's all I got :/
|