157889e - Update tracked spells after 3 more raid tests
[wowui.git] / OmaUF / Events.lua
index 9a06947..03e790c 100644 (file)
@@ -22,7 +22,7 @@ local UnitIsTapDenied, UnitSelectionColor = UnitIsTapDenied, UnitSelectionColor;
 local GetRaidTargetIndex, SetRaidTargetIconTexture = GetRaidTargetIndex, SetRaidTargetIconTexture;
 local RAID_CLASS_COLORS = RAID_CLASS_COLORS;
 
 local GetRaidTargetIndex, SetRaidTargetIconTexture = GetRaidTargetIndex, SetRaidTargetIconTexture;
 local RAID_CLASS_COLORS = RAID_CLASS_COLORS;
 
-local updateAuraFrames = OmaUFAuras.UpdateAuras;
+local updateAuras = OmaUFAuras.UpdateAuras;
 
 local Settings = OmaUFSettings;
 local baseColor = Settings.BaseColor;
 
 local Settings = OmaUFSettings;
 local baseColor = Settings.BaseColor;
@@ -40,7 +40,7 @@ function M.RegisterUnitEvents(frame)
     frame:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", frame.unit, displayed);
     frame:RegisterUnitEvent("UNIT_MAXHEALTH", frame.unit, displayed);
     if frame.mana then
     frame:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", frame.unit, displayed);
     frame:RegisterUnitEvent("UNIT_MAXHEALTH", frame.unit, displayed);
     if frame.mana then
-        frame:RegisterUnitEvent("UNIT_POWER", frame.unit, displayed);
+        frame:RegisterUnitEvent("UNIT_POWER_UPDATE", frame.unit, displayed);
         frame:RegisterUnitEvent("UNIT_MAXPOWER", frame.unit, displayed);
         frame:RegisterUnitEvent("UNIT_DISPLAYPOWER", frame.unit, displayed);
         frame:RegisterUnitEvent("UNIT_POWER_BAR_SHOW", frame.unit, displayed);
         frame:RegisterUnitEvent("UNIT_MAXPOWER", frame.unit, displayed);
         frame:RegisterUnitEvent("UNIT_DISPLAYPOWER", frame.unit, displayed);
         frame:RegisterUnitEvent("UNIT_POWER_BAR_SHOW", frame.unit, displayed);
@@ -171,11 +171,6 @@ local function updateShield(frame, unit)
 end
 M.UpdateShield = updateShield;
 
 end
 M.UpdateShield = updateShield;
 
-local function updateAuras(frame, unit)
-    updateAuraFrames(frame, unit);
-end
-M.UpdateAuras = updateAuras;
-
 local function updateAggro(frame, unit)
     local status = UnitThreatSituation(unit);
     if status and status > 0 then
 local function updateAggro(frame, unit)
     local status = UnitThreatSituation(unit);
     if status and status > 0 then
@@ -335,7 +330,7 @@ local eventFuncs = {
         updateHealthText(frame, frame.displayed);
         if frame.shield then updateShield(frame, frame.displayed) end
     end,
         updateHealthText(frame, frame.displayed);
         if frame.shield then updateShield(frame, frame.displayed) end
     end,
-    ["UNIT_POWER"] = function(frame)
+    ["UNIT_POWER_UPDATE"] = function(frame)
         updatePower(frame, frame.displayed);
         updatePowerText(frame, frame.displayed);
     end,
         updatePower(frame, frame.displayed);
         updatePowerText(frame, frame.displayed);
     end,
@@ -438,5 +433,5 @@ eventFuncs["INSTANCE_ENCOUNTER_ENGAGE_UNIT"] = eventFuncs["UPDATE_ALL_BARS"];
 eventFuncs["UNIT_TARGETABLE_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
 
 function M.UnitEvent(self, event, arg1)
 eventFuncs["UNIT_TARGETABLE_CHANGED"] = eventFuncs["UPDATE_ALL_BARS"];
 
 function M.UnitEvent(self, event, arg1)
-    eventFuncs[event](self, arg1);
+    return eventFuncs[event](self, arg1);
 end
 end