6781949 - fix bottomwarn hiding
[wowui.git] / OmaTMW / TellMeWhen.lua
index 4b538c4..6037c86 100644 (file)
@@ -65,8 +65,8 @@ local chars = {
                 auraFilter = "PLAYER HELPFUL",
                 x = 570,
                 y = 530,
                 auraFilter = "PLAYER HELPFUL",
                 x = 570,
                 y = 530,
-                width = 80,
-                height = 80,
+                width = 40,
+                height = 40,
             },
             {
                 unit = "player",
             },
             {
                 unit = "player",
@@ -93,9 +93,8 @@ local chars = {
         ["Vildan"] = {
             {
                 unit = "target",
         ["Vildan"] = {
             {
                 unit = "target",
-                spec = 3, -- Retribution
-                auras = {"Judgment"},
-                auraFilter = "PLAYER HARMFUL",
+                auras = {"Bursting With Pride"},
+                auraFilter = "HELPFUL",
                 x = 570, -- placed over Innervate frame
                 y = 440,
                 width = 80,
                 x = 570, -- placed over Innervate frame
                 y = 440,
                 width = 80,
@@ -103,13 +102,12 @@ local chars = {
             },
             {
                 unit = "player",
             },
             {
                 unit = "player",
-                spec = 3, -- Retribution
                 auras = {"Divine Purpose"},
                 auraFilter = "PLAYER HELPFUL",
                 x = 570,
                 y = 530,
                 auras = {"Divine Purpose"},
                 auraFilter = "PLAYER HELPFUL",
                 x = 570,
                 y = 530,
-                width = 80,
-                height = 80,
+                width = 40,
+                height = 40,
             },
             {
                 unit = "player",
             },
             {
                 unit = "player",
@@ -121,6 +119,15 @@ local chars = {
                 width = 80,
                 height = 80,
             },
                 width = 80,
                 height = 80,
             },
+            {
+                unit = "player",
+                auras = {"Seraphim", "Righteous Verdict"},
+                auraFilter = "PLAYER HELPFUL",
+                x = 570,
+                y = 480,
+                width = 40,
+                height = 40,
+            },
             {
                 unit = "player",
                 auras = {"Divine Shield"},
             {
                 unit = "player",
                 auras = {"Divine Shield"},
@@ -130,6 +137,46 @@ local chars = {
                 width = 80,
                 height = 80,
             },
                 width = 80,
                 height = 80,
             },
+            {
+                unit = "player",
+                auras = {"Devotion Aura"},
+                auraFilter = "HELPFUL",
+                invert = true,
+                x = 720,
+                y = 440,
+                width = 60,
+                height = 60,
+            },
+        },
+        ["Gilden"] = {
+            {
+                unit = "target",
+                auras = {"Shadow Word: Pain", "Purge the Wicked"},
+                auraFilter = "PLAYER HARMFUL",
+                x = 660,
+                y = 440,
+                width = 60,
+                height = 60,
+            },
+            {
+                unit = "player",
+                auras = {"Power Word: Fortitude"},
+                auraFilter = "HELPFUL",
+                invert = true,
+                x = 720,
+                y = 440,
+                width = 60,
+                height = 60,
+            },
+            {
+                unit = "player",
+                auras = {"Overcharge Mana"},
+                auraFilter = "PLAYER HELPFUL",
+                x = 720,
+                y = 440,
+                width = 60,
+                height = 60,
+            },
         },
         ["Gedren"] = {
             {
         },
         ["Gedren"] = {
             {
@@ -159,6 +206,55 @@ local chars = {
                 width = 40,
                 height = 40,
             },
                 width = 40,
                 height = 40,
             },
+            {
+                unit = "player",
+                auras = {"Unleash Life"},
+                auraFilter = "PLAYER HELPFUL",
+                x = 740,
+                y = 440,
+                width = 40,
+                height = 40,
+            },
+        },
+        ["Gran"] = {
+            {
+                unit = "player",
+                auras = {"Tidal Waves"},
+                auraFilter = "PLAYER HELPFUL",
+                x = 660,
+                y = 440,
+                width = 40,
+                height = 40,
+            },
+            {
+                unit = "player",
+                auras = {"Healing Rain"},
+                auraFilter = "PLAYER HELPFUL",
+                x = 700,
+                y = 440,
+                width = 40,
+                height = 40,
+            },
+            {
+                unit = "player",
+                auras = {"Unleash Life"},
+                auraFilter = "PLAYER HELPFUL",
+                x = 740,
+                y = 440,
+                width = 40,
+                height = 40,
+            },
+        },
+        ["Gedrin"] = {
+            {
+                unit = "pet",
+                auras = {"Frenzy"},
+                auraFilter = "HELPFUL",
+                x = 660,
+                y = 440,
+                width = 40,
+                height = 40,
+            },
         },
     },
 };
         },
     },
 };
@@ -178,13 +274,22 @@ local chars = {
 local settings = {
     {
         unit = "player",
 local settings = {
     {
         unit = "player",
-        auras = {"Innervate"},
+        auras = {"Innervate", "Gift of the Titans", "Power Infusion"},
         auraFilter = "HELPFUL",
         x = 570,
         y = 440,
         width = 80,
         height = 80,
     },
         auraFilter = "HELPFUL",
         x = 570,
         y = 440,
         width = 80,
         height = 80,
     },
+    {
+        unit = "player",
+        auras = {"Ineffable Truth"},
+        auraFilter = "HELPFUL",
+        x = 570,
+        y = 440,
+        width = 40,
+        height = 40,
+    },
     {
         unit = "player",
         auras = {
     {
         unit = "player",
         auras = {
@@ -193,7 +298,10 @@ local settings = {
             "Time Bomb", "Broken Shard", "Demolished", "Fetid Rot", "Roiling Deceit",
             "Putrid Blood", "Endemic Virus", "Lingering Infection", "Gigavolt Charge",
             "Crackling Lightning", "Storm's Wail", "Death's Door", "Deathly Withering",
             "Time Bomb", "Broken Shard", "Demolished", "Fetid Rot", "Roiling Deceit",
             "Putrid Blood", "Endemic Virus", "Lingering Infection", "Gigavolt Charge",
             "Crackling Lightning", "Storm's Wail", "Death's Door", "Deathly Withering",
-            "Chilling Touch", "Volatile Charge", "Liquid Gold", "Drained Soul"
+            "Chilling Touch", "Volatile Charge", "Liquid Gold", "Drained Soul", "Evoke Anguish",
+            "Ancient Curse", "Corrosion", "Debilitating Spit", "Tasty Morsel", "Encroaching Shadows",
+            "Corrupted Existence", "Madness Bomb", "Crimson Chorus", "Essence Sap", "Bloodlight",
+            "Arcane Vulnerability", "Wicked Laceration", "Withering Touch"
         },
         auraFilter = "HARMFUL",
         x = 660,
         },
         auraFilter = "HARMFUL",
         x = 660,
@@ -201,6 +309,17 @@ local settings = {
         width = 80,
         height = 80,
     },
         width = 80,
         height = 80,
     },
+    {
+        unit = "player",
+        auras = {
+            "Adaptive Membrane", "Gluttonous Miasma"
+        },
+        auraFilter = "HARMFUL",
+        x = 660,
+        y = 780,
+        width = 160,
+        height = 160,
+    },
 };
 
 local frames = {};
 };
 
 local frames = {};
@@ -224,7 +343,7 @@ local function updateAuraFrame(frame)
             name, icon, count, _, duration, expires = UnitAura(unit, i, auraFilter);
             if not name then break end
             -- possible improvement to add spellID as an option
             name, icon, count, _, duration, expires = UnitAura(unit, i, auraFilter);
             if not name then break end
             -- possible improvement to add spellID as an option
-            if frame.auras[name] then
+            if frame.auras[name] and not frame.invert then
                 if count > 1 then
                     frame.stack:SetText(count);
                     frame.stack:Show();
                 if count > 1 then
                     frame.stack:SetText(count);
                     frame.stack:Show();
@@ -240,9 +359,17 @@ local function updateAuraFrame(frame)
                 frame.icon:SetTexture(icon);
                 frame:Show();
                 return;
                 frame.icon:SetTexture(icon);
                 frame:Show();
                 return;
+            elseif frame.auras[name] and frame.invert then
+                frame.icon:SetTexture(icon);
+                frame:Hide();
+                return;
             end
             i = i + 1;
         end
             end
             i = i + 1;
         end
+        if frame.invert then
+            frame:Show(); -- not functional without first hiding once to get SetTexture
+            return;
+        end
     end
     frame:Hide();
 end
     end
     frame:Hide();
 end
@@ -289,6 +416,7 @@ local function createTMW(name, config, parent)
     end
     frame.auraFilter = config.auraFilter;
     frame.totems = config.totems;
     end
     frame.auraFilter = config.auraFilter;
     frame.totems = config.totems;
+    frame.invert = config.invert;
     frame:Hide();
     frame.base = frame:CreateTexture(nil, "BACKGROUND");
     frame.base:SetAllPoints();
     frame:Hide();
     frame.base = frame:CreateTexture(nil, "BACKGROUND");
     frame.base:SetAllPoints();
@@ -298,6 +426,7 @@ local function createTMW(name, config, parent)
     frame.icon:SetPoint("BOTTOMRIGHT", frame.base, "BOTTOMRIGHT", -1, 1);
     frame.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
     frame.stack = frame:CreateFontString(nil, "OVERLAY", "NumberFontNormalLarge");
     frame.icon:SetPoint("BOTTOMRIGHT", frame.base, "BOTTOMRIGHT", -1, 1);
     frame.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
     frame.stack = frame:CreateFontString(nil, "OVERLAY", "NumberFontNormalLarge");
+    frame.stack:SetFont(STANDARD_TEXT_FONT, 26, "OUTLINE");
     frame.stack:SetPoint("TOPLEFT");
     frame.stack:Hide();
     frame.cd = CreateFrame("Cooldown", name.."CD", frame, "CooldownFrameTemplate");
     frame.stack:SetPoint("TOPLEFT");
     frame.stack:Hide();
     frame.cd = CreateFrame("Cooldown", name.."CD", frame, "CooldownFrameTemplate");