local current, max = UnitHealth(unit), frame.health.max;
local healthLost = max - current;
if UnitIsDeadOrGhost(unit) then
- if UnitHasIncomingResurrection(unit) then
- frame.text:SetText("Rez");
- else
- frame.text:SetText("Dead");
- end
+ frame.text:SetText("Dead");
elseif not UnitIsConnected(unit) then
frame.text:SetText("DC");
elseif healthLost > 0 then
end
end
+local function updateIncomingRes(frame, unit)
+ if UnitHasIncomingResurrection(unit) then
+ frame.rez:Show();
+ else
+ frame.rez:Hide();
+ end
+end
+
local function updateMaxHealth(frame, unit)
frame.health.max = UnitHealthMax(unit);
end
updateText(frame, frame.displayed);
end,
["INCOMING_RESURRECT_CHANGED"] = function(frame)
- -- TODO have an icon
- updateText(frame, frame.displayed);
+ updateIncomingRes(frame, frame.unit);
end,
["PARTY_MEMBER_ENABLE"] = function(frame)
-- new power info possibly (FrameXML/CompactUnitFrame.lua)