8b1be3a - More auras and stagger tracking
[wowui.git] / kehys / updater.lua
index 94977d4..42aedf0 100644 (file)
@@ -230,6 +230,7 @@ function addon.FrameUpdate(frame)
                 frame.heal = {};
                 frame.buff1 = {};
                 frame.buff2 = {};
                 frame.heal = {};
                 frame.buff1 = {};
                 frame.buff2 = {};
+                frame.stagger = {};
                 addon.SetAuras(frame.unit, frame.guid);
                 frame.rounds = 0;
             end
                 addon.SetAuras(frame.unit, frame.guid);
                 frame.rounds = 0;
             end
@@ -246,6 +247,10 @@ function addon.FrameUpdate(frame)
                 local _, amount = next(frame.stacks);
                 frame.stack:SetText(amount);
                 if not frame.stack:IsShown() then frame.stack:Show() end
                 local _, amount = next(frame.stacks);
                 frame.stack:SetText(amount);
                 if not frame.stack:IsShown() then frame.stack:Show() end
+            elseif next(frame.hits) then
+                local _, amount = next(frame.hits);
+                frame.stack:SetText(amount);
+                if not frame.stack:IsShown() then frame.stack:Show() end
             elseif frame.stack:IsShown() then
                 frame.stack:Hide();
             end
             elseif frame.stack:IsShown() then
                 frame.stack:Hide();
             end
@@ -267,13 +272,21 @@ 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();
+            -- DK Death Strike and Monk Stagger tracking
+            if frame.rolename == "TANK" then
+                if frame.classname == "DEATHKNIGHT" then
+                    local power = UnitPower(unit);
+                    if power < 45 then
+                        if not frame.bottomwarn:IsShown() then frame.bottomwarn:Show() end
+                    elseif frame.bottomwarn:IsShown() then
+                        frame.bottomwarn:Hide();
+                    end
+                elseif frame.classname == "MONK" then
+                    if next(frame.stagger) then -- Heavy Stagger
+                        if not frame.bottomwarn:IsShown() then frame.bottomwarn:Show() end
+                    elseif frame.bottomwarn:IsShown() then
+                        frame.bottomwarn:Hide();
+                    end
                 end
             elseif frame.bottomwarn:IsShown() then
                 frame.bottomwarn:Hide();
                 end
             elseif frame.bottomwarn:IsShown() then
                 frame.bottomwarn:Hide();