Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-06-10, 02:10 PM   #1
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
hp text disappear on max health

Hi -

I'm modifying Freeb's awesome oUF layout to my liking and would like to hide the *player only* hp text information on max hp (and have it appear when hp is lost). This is the chunk I was going for in Freeb's ftags.lua:

Code:
oUF.Tags['freeb:hp']  = function(u) 
	local min, max = UnitHealth(u), UnitHealthMax(u)

	if(unit == "player") then
		if(min < max) then
			return siValue(min).."."..math.floor(min/max*100+.5).."%"
		else
			return bar.value:SetText(" ")
		end
	else
	
        return siValue(min).."."..math.floor(min/max*100+.5).."%"		
	
        end

end
No errors, but it doesn't hide the hp info on max health. Any ideas? Thanks.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » hp text disappear on max health


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off