git
/
wowui.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
8da63c0 - Add incoming res icon
[wowui.git]
/
OmaRF
/
CFrame.lua
diff --git
a/OmaRF/CFrame.lua
b/OmaRF/CFrame.lua
index
64db699
..
1273367
100644
(file)
--- a/
OmaRF/CFrame.lua
+++ b/
OmaRF/CFrame.lua
@@
-66,11
+66,7
@@
local function updateText(frame, unit)
local current, max = UnitHealth(unit), frame.health.max;
local healthLost = max - current;
if UnitIsDeadOrGhost(unit) then
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
elseif not UnitIsConnected(unit) then
frame.text:SetText("DC");
elseif healthLost > 0 then
@@
-89,6
+85,14
@@
local function updateText(frame, unit)
end
end
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
local function updateMaxHealth(frame, unit)
frame.health.max = UnitHealthMax(unit);
end
@@
-283,8
+287,7
@@
local eventFuncs = {
updateText(frame, frame.displayed);
end,
["INCOMING_RESURRECT_CHANGED"] = function(frame)
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)
end,
["PARTY_MEMBER_ENABLE"] = function(frame)
-- new power info possibly (FrameXML/CompactUnitFrame.lua)