782c7be - Clickable boss frames for Kael
[wowui.git] / kehys / updater.lua
index 347096c..94977d4 100644 (file)
@@ -48,8 +48,8 @@ function addon.FrameUpdate(frame)
     -- range check (doesn't have an event) frames can be marked constantly visible
     if not frame.constant then
         local inrange, checked = UnitInRange(unit);
     -- range check (doesn't have an event) frames can be marked constantly visible
     if not frame.constant then
         local inrange, checked = UnitInRange(unit);
-        local inphase = UnitInPhase(unit);
-        if (checked and not inrange) or not inphase then
+        local inphase = UnitPhaseReason(unit);
+        if (checked and not inrange) or inphase then
             frame:SetAlpha(0.55);
         else
             frame:SetAlpha(1);
             frame:SetAlpha(0.55);
         else
             frame:SetAlpha(1);
@@ -267,6 +267,17 @@ function addon.FrameUpdate(frame)
             elseif frame.glow:IsShown() then
                 frame.glow:Hide();
             end
             elseif frame.glow:IsShown() then
                 frame.glow:Hide();
             end
+            -- DK death strike tracking
+            if frame.isdk and frame.rolename == "TANK" then
+                local power = UnitPower(unit);
+                if power < 45 then
+                    frame.bottomwarn:Show();
+                elseif frame.bottomwarn:IsShown() then
+                    frame.bottomwarn:Hide();
+                end
+            elseif frame.bottomwarn:IsShown() then
+                frame.bottomwarn:Hide();
+            end
             -- overlays
             if next(frame.alert) then
                 -- major
             -- overlays
             if next(frame.alert) then
                 -- major