frame.text:Hide();
end
end
+M.UpdateText = updateText;
local function updateMaxHealth(frame, unit)
frame.health.max = UnitHealthMax(unit);
end
+M.UpdateMaxHealth = updateMaxHealth;
local function updateHealth(frame, unit)
local current, max = UnitHealth(unit), frame.health.max;
updateText(frame, unit); -- update revive
end
end
+M.UpdateHealth = updateHealth;
-- TODO maybe add a prefix when in vehicle
local function updateName(frame, unit)
local color = RAID_CLASS_COLORS[class];
if color then frame.name:SetVertexColor(color.r, color.g, color.b) end
end
+M.UpdateName = updateName;
local function updateHealPred(frame, unit)
local incoming = UnitGetIncomingHeals(unit) or 0;
frame.healpred:Hide();
end
end
+M.UpdateHealPred = updateHealPred;
local function updateShield(frame, unit)
local shield = UnitGetTotalAbsorbs(unit) or 0;
frame.shieldhl:Hide();
end
end
+M.UpdateShield = updateShield;
local function updateHealAbsorb(frame, unit)
local absorb = UnitGetTotalHealAbsorbs(unit) or 0;
frame.healabsorb:Hide();
end
end
+M.UpdateHealAbsorb = updateHealAbsorb;
local function updateAuras(frame, unit)
local alert = checkIndicators(frame, unit);
end
end
end
+M.UpdateAuras = updateAuras;
local function updateAggro(frame, unit)
local status = UnitThreatSituation(unit);
frame.base:SetVertexColor(unpack(baseColor));
end
end
+M.UpdateAggro = updateAggro;
local function updateVehicle(frame)
local shouldTargetVehicle = UnitHasVehicleUI(frame.unit) and
registerUnitEvents(frame);
end
end
+M.UpdateVehicle = updateVehicle;
local function updateRole(frame, unit)
local role = UnitGroupRolesAssigned(unit);
frame.role:Hide();
end
end
+M.UpdateRole = updateRole;
local function updateReadyCheck(frame, unit)
local status = GetReadyCheckStatus(unit);
frame.ready:Hide()
end
end
+M.UpdateReadyCheck = updateReadyCheck;
local function updateRaidMarker(frame, unit)
local index = GetRaidTargetIndex(unit);
frame.targeticon:Hide();
end
end
+M.UpdateRaidMarker = updateRaidMarker;
local eventFuncs = {
["UNIT_HEALTH"] = function(frame)