Thread Tools Display Modes
12-22-14, 05:11 AM   #1
skp2010
A Murloc Raider
Join Date: Feb 2012
Posts: 4
Is there any minute HealthColors addons updates, please?

http://www.wowinterface.com/download...0-HealthColors

Party, pat, Eye target I hope also changed as
  Reply With Quote
12-22-14, 05:29 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You should post an actual link to the addon page instead of a direct link to a ZIP file:
http://www.wowinterface.com/download...lthColors.html

Not tested at all, but this will probably work. Change the contents of the TOC file to this:
Code:
## Interface: 60000
## Title: HealthColors
## Notes: Multi-color the health bar
## Author: Chris & Matthew Brunner, stripped down from a mod by Jerek Dai
HealthColors.lua
Change the contents of the Lua file to this:
Code:
local function OnMinMaxChanged(bar, minValue, maxValue)
	bar.maxValue = maxValue
end

local function SetValue(bar, value)
	bar:real_SetValue(value)
	local percent = value / bar.maxValue
	if percent > 0.5 then
		bar:SetStatusBarColor(2 * (1 - percent), 1, 0)
	else
		bar:SetStatusBarColor(1, 2 * percent, 0)
	end
end

local function HandleBar(bar)
	local _, maxValue = bar:GetMinMaxValues()
	bar.maxValue = maxValue
	bar.lockColor = true
	bar:HookScript("OnMinMaxChanged", OnMinMaxChanged)
	bar.real_SetValue = bar.SetValue
	bar.SetValue = SetValue
end

HandleBar(PlayerFrameHealthBar)
HandleBar(TargetFrameHealthBar)
And delete the XML file, as it's not needed.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Is there any minute HealthColors addons updates, please?

Thread Tools
Display Modes

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