/trunk
function update_health (frame, event, unit, bar, min, max) |
if unit ~= frame.unit then return end |
local class = select(2, UnitClass(unit)) |
local color = colors_raid[class] |
if color then |
bar:SetStatusBarColor(color.r, color.g, color.b) |
end |
bar:SetStatusBarColor(0.25, 0.25, 0.25) |
bar.value:SetText(min) |
end |
health.value:SetShadowColor(0, 0, 0) |
health.value:SetShadowOffset(1, -1) |
-- powerbar |
power:SetPoint(TL, health, BL, 0, -padding) |
power:SetWidth(power_width) |
power.value:SetShadowColor(0, 0, 0) |
power.value:SetShadowOffset(1, -1) |
-- buffs |
buffs:SetPoint(MR, frame, ML, -padding, 0) |
buffs:SetWidth(bar_width) |
frame.outsideRangeAlpha = 0.5 |
end |
-- oUF_Smooth |
health.Smooth = true |
power.Smooth = true |
-- oUF_DebuffHighlight |
frame.DebuffHighlightBackdrop = true |
frame.Health = health |
frame.OverrideUpdateHealth = update_health |
frame.Power = power |
frame.PostUpdatePower = update_power |
frame.Name = health.info |
frame.Info = power.info |
frame.Buffs = buffs |
frame.Debuffs = debuffs |
frame.Leader = leader |
end |
oUF:RegisterStyle('Industrial', create_unitframe) |