Originally Posted by Beladona
Code:
function MHealth_OnUpdate()
local health = {};
if UnitExists("target") then
health.c = MobHealth_GetTargetCurHP();
health.m = MobHealth_GetTargetMaxHP();
|
Why create a table? That will put pressure on the GC. I'd use the following:
Code:
function MHealth_OnUpdate()
if UnitExists("target") then
local health_c = MobHealth_GetTargetCurHP()
local health_m = MobHealth_GetTargetMaxHP()