862e8cd - Add raid marker and bres tracking to OmaTMW
[wowui.git] / kehys / updater.lua
index d7d3cb5..94977d4 100644 (file)
@@ -14,6 +14,7 @@ local UnitGetIncomingHeals, UnitGetTotalAbsorbs = UnitGetIncomingHeals, UnitGetT
 local UnitIsDeadOrGhost, UnitIsConnected = UnitIsDeadOrGhost, UnitIsConnected;
 local UnitGetTotalHealAbsorbs = UnitGetTotalHealAbsorbs;
 local InCombatLockdown, IsResting = InCombatLockdown, IsResting;
 local UnitIsDeadOrGhost, UnitIsConnected = UnitIsDeadOrGhost, UnitIsConnected;
 local UnitGetTotalHealAbsorbs = UnitGetTotalHealAbsorbs;
 local InCombatLockdown, IsResting = InCombatLockdown, IsResting;
+local UnitInRange, UnitInPhase = UnitInRange, UnitInPhase;
 
 local dispelcolor = addon.Colors.OverlayColorDispel;
 local charmcolor = addon.Colors.OverlayColorCharm;
 
 local dispelcolor = addon.Colors.OverlayColorDispel;
 local charmcolor = addon.Colors.OverlayColorCharm;
@@ -22,6 +23,8 @@ local healcolor = addon.Colors.OverlayColorHeal;
 
 local ignoredAuras = {
     [315176] = true, -- Grasping Tendrils
 
 local ignoredAuras = {
     [315176] = true, -- Grasping Tendrils
+    [313759] = true, -- Cursed Blood (Il'gynoth)
+    [312486] = true, -- Recurring Nightmare (Il'gynoth)
 };
 
 local powerColors = {
 };
 
 local powerColors = {
@@ -45,7 +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);
-        if checked and not inrange 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);
@@ -138,6 +142,8 @@ function addon.FrameUpdate(frame)
                     frame.text:SetFormattedText("%.2fM", current / 1000000);
                 elseif current > 1000 then -- 1.0K
                     frame.text:SetFormattedText("%.1fK", current / 1000);
                     frame.text:SetFormattedText("%.2fM", current / 1000000);
                 elseif current > 1000 then -- 1.0K
                     frame.text:SetFormattedText("%.1fK", current / 1000);
+                else
+                    frame.text:SetFormattedText("%i", current);
                 end
                 if not frame.text:IsShown() then frame.text:Show() end
             end
                 end
                 if not frame.text:IsShown() then frame.text:Show() end
             end
@@ -223,6 +229,7 @@ function addon.FrameUpdate(frame)
                 frame.stacks = {};
                 frame.heal = {};
                 frame.buff1 = {};
                 frame.stacks = {};
                 frame.heal = {};
                 frame.buff1 = {};
+                frame.buff2 = {};
                 addon.SetAuras(frame.unit, frame.guid);
                 frame.rounds = 0;
             end
                 addon.SetAuras(frame.unit, frame.guid);
                 frame.rounds = 0;
             end
@@ -260,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