@Monolit
Easy one. Haste renamed some functions. Please read oUF/elements/health.lua
Search for "post" and you will find "
PostUpdate(unit, min, max)"
So you can do
Code:
--lib.lua
lib.PostUpdateHealth = function(s, unit, min, max)
local r, g, b = oUF.ColorGradient(min/max, 1,0,0, .7,.41,.44, .3,.3,.3)
s:SetStatusBarColor(r, g, b)
end
Now you have 2 options. Edit the PostUpdateHealth function only to some units or to all of them.
If it should only be applied to some units then go to core.lua and add this to the style functions of the units you want to adjust.
Code:
--core.lua
self.Health.PostUpdate = lib.PostUpdateHealth
If you want that function in ANY unit you can even change the "
lib.gen_hpbar"-function. Find:
Code:
b:SetAllPoints(s)
f.Health = s
and change that to
Code:
b:SetAllPoints(s)
s.PostUpdate = lib.PostUpdateHealth
f.Health = s
"s" is your health statusbar and gets handed over later to the self object which is represented by the variable "f" in the function, so f.Health is the same as self.Health.
~~~~~~~~~~~~
@vlakarados
SetManyAttributes is gone since 1.4
Just look at any lately released oUF 1.4 compatible layouts how they implement raid groups.
There is a new SpawnHeader() afaik.