ad5b150 - Add buff indicator and clear all indicators at start of fight
[wowui.git] / kehys / events.lua
index 4a9264f..97f56da 100644 (file)
@@ -32,6 +32,7 @@ local width = 80;
 
 function addon.RegisterEvents(frame)
     frame:RegisterEvent("PLAYER_ENTERING_WORLD");
 
 function addon.RegisterEvents(frame)
     frame:RegisterEvent("PLAYER_ENTERING_WORLD");
+    frame:RegisterEvent("PLAYER_REGEN_DISABLED");
     frame:RegisterEvent("READY_CHECK");
     frame:RegisterEvent("READY_CHECK_FINISHED");
     frame:RegisterEvent("GROUP_ROSTER_UPDATE");
     frame:RegisterEvent("READY_CHECK");
     frame:RegisterEvent("READY_CHECK_FINISHED");
     frame:RegisterEvent("GROUP_ROSTER_UPDATE");
@@ -159,6 +160,14 @@ local eventFuncs = {
     ["RAID_TARGET_UPDATE"] = function(frame)
         updateRaidMarker(frame, frame.displayed);
     end,
     ["RAID_TARGET_UPDATE"] = function(frame)
         updateRaidMarker(frame, frame.displayed);
     end,
+    ["PLAYER_REGEN_DISABLED"] = function(frame)
+        -- clear buff status on entering combat, should also use UnitAura to re-fill
+        frame.tankcd = {};
+        frame.alert = {};
+        frame.stacks = {};
+        frame.heal = {};
+        frame.buff1 = {};
+    end,
     ["UPDATE_ALL_BARS"] = function(frame)
         updateRole(frame, frame.unit);
         updateVehicle(frame);
     ["UPDATE_ALL_BARS"] = function(frame)
         updateRole(frame, frame.unit);
         updateVehicle(frame);