local GetRaidTargetIndex, SetRaidTargetIconTexture = GetRaidTargetIndex, SetRaidTargetIconTexture;
local RAID_CLASS_COLORS = RAID_CLASS_COLORS;
local GetRaidTargetIndex, SetRaidTargetIconTexture = GetRaidTargetIndex, SetRaidTargetIconTexture;
local RAID_CLASS_COLORS = RAID_CLASS_COLORS;
frame:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_MAXHEALTH", frame.unit, displayed);
if frame.mana then
frame:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_MAXHEALTH", frame.unit, displayed);
if frame.mana then
frame:RegisterUnitEvent("UNIT_MAXPOWER", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_DISPLAYPOWER", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_POWER_BAR_SHOW", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_MAXPOWER", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_DISPLAYPOWER", frame.unit, displayed);
frame:RegisterUnitEvent("UNIT_POWER_BAR_SHOW", frame.unit, displayed);
local function updateAggro(frame, unit)
local status = UnitThreatSituation(unit);
if status and status > 0 then
local function updateAggro(frame, unit)
local status = UnitThreatSituation(unit);
if status and status > 0 then
updateHealthText(frame, frame.displayed);
if frame.shield then updateShield(frame, frame.displayed) end
end,
updateHealthText(frame, frame.displayed);
if frame.shield then updateShield(frame, frame.displayed) end
end,
updatePower(frame, frame.displayed);
updatePowerText(frame, frame.displayed);
end,
updatePower(frame, frame.displayed);
updatePowerText(frame, frame.displayed);
end,
eventFuncs["UNIT_TARGETABLE_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
function M.UnitEvent(self, event, arg1)
eventFuncs["UNIT_TARGETABLE_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
function M.UnitEvent(self, event, arg1)