3f0366d - Add a secondary alert color, high healing needed
[wowui.git] / kehys / auras.lua
index 3e29a31..ecefd00 100644 (file)
@@ -18,22 +18,31 @@ local watchedAuras = {
     --[258323] = {bar=false}, -- Infected Wound
     --[262513] = {bar=false}, -- Azerite Heartseeker
     -- Uldir
     --[258323] = {bar=false}, -- Infected Wound
     --[262513] = {bar=false}, -- Azerite Heartseeker
     -- Uldir
-    [265264] = 2, -- Void Lash (Zek'voz)
+    [265264] = {2, "alert"}, -- Void Lash (Zek'voz)
     -- Battle of Dazar'alor
     -- Battle of Dazar'alor
-    [285213] = 1, -- Caress of Death (Rastakhan)
+    [285213] = {1, "alert"}, -- Caress of Death (Rastakhan)
+    [285195] = {12, "heal"}, -- Deathly Withering (Rastakhan)
 };
 
 local auraEvents = {};
 auraEvents.SPELL_AURA_APPLIED = function(frame, id, _, _, _, amount)
 };
 
 local auraEvents = {};
 auraEvents.SPELL_AURA_APPLIED = function(frame, id, _, _, _, amount)
-    if amount == nil or amount >= watchedAuras[id] then
-        frame.alert[id] = true;
+    if (amount == nil and watchedAuras[id][1] == 1) or (amount ~= nil and amount >= watchedAuras[id][1]) then
+        if watchedAuras[id][2] == "alert" then
+            frame.alert[id] = true;
+        else
+            frame.heal[id] = true;
+        end
     end
 end
 auraEvents.SPELL_AURA_APPLIED_DOSE = auraEvents.SPELL_AURA_APPLIED;
 auraEvents.SPELL_AURA_REFRESH = auraEvents.SPELL_AURA_APPLIED;
 auraEvents.SPELL_AURA_REMOVED = function(frame, id, _, _, _, amount)
     if amount == nil or amount == 0 then
     end
 end
 auraEvents.SPELL_AURA_APPLIED_DOSE = auraEvents.SPELL_AURA_APPLIED;
 auraEvents.SPELL_AURA_REFRESH = auraEvents.SPELL_AURA_APPLIED;
 auraEvents.SPELL_AURA_REMOVED = function(frame, id, _, _, _, amount)
     if amount == nil or amount == 0 then
-        frame.alert[id] = nil;
+        if watchedAuras[id][2] == "alert" then
+            frame.alert[id] = nil;
+        else
+            frame.heal[id] = nil;
+        end
     end
 end
 auraEvents.SPELL_AURA_REMOVED_DOSE = auraEvents.SPELL_AURA_REMOVED;
     end
 end
 auraEvents.SPELL_AURA_REMOVED_DOSE = auraEvents.SPELL_AURA_REMOVED;