Thread: To Gello
View Single Post
08-09-05, 07:25 AM   #12
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
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()
  Reply With Quote