3ddb182 - Fix insecure boss frames
[wowui.git] / OmaAB / TellMeWhen.lua
index 329589e..a43d22d 100644 (file)
@@ -77,9 +77,9 @@ local settings = {
     {
         unit = "player",
         auras = {
-            "Necrotic Embrace", "Flametouched", "Shadowtouched", "Blazing Eruption",
-            "Shattering Scream", "Consuming Hunger", "Unstable Soul", "Time Bomb",
-            "Broken Shard",
+            "Delusions", "Entropic Blast", "Necrotic Embrace", "Flametouched", "Shadowtouched",
+            "Blazing Eruption", "Shattering Scream", "Consuming Hunger", "Unstable Soul",
+            "Time Bomb", "Broken Shard",
         },
         auraFilter = "HARMFUL",
         x = 660,
@@ -107,6 +107,12 @@ local function updateAuraFrame(frame)
         for _, aura in pairs(frame.auras) do
             name, _, icon, count, _, duration, expires =  UnitAura(unit, aura, nil, frame.auraFilter);
             if name then
+                if count > 0 then
+                    frame.stack:SetText(count);
+                    frame.stack:Show();
+                else
+                    frame.stack:Hide();
+                end
                 if expires > 0 then
                     frame.cd:SetCooldown(expires - duration, duration);
                     frame.cd:Show();
@@ -152,10 +158,15 @@ local function createTMW(name, config, parent)
     frame.auraFilter = config.auraFilter;
     frame.totems = config.totems;
     frame:Hide();
-    -- TODO a background, like Masque, stack count
+    frame.base = frame:CreateTexture(nil, "BACKGROUND");
+    frame.base:SetAllPoints();
+    frame.base:SetColorTexture(0, 0, 0, 0.6);
     frame.icon = frame:CreateTexture(nil, "ARTWORK");
-    frame.icon:SetAllPoints();
+    frame.icon:SetPoint("TOPLEFT", frame.base, "TOPLEFT", 1, -1);
+    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:SetPoint("TOPLEFT");
     frame.cd = CreateFrame("Cooldown", name.."CD", frame, "CooldownFrameTemplate");
     frame.cd:SetReverse(true);
     frame.cd:SetAllPoints();
@@ -194,7 +205,6 @@ local function initialize()
     end
 end
 
--- TODO have healthstone icon for player separate from this
 Indicators:RegisterEvent("UNIT_AURA");
 Indicators:RegisterEvent("PLAYER_TARGET_CHANGED");
 Indicators:RegisterEvent("PLAYER_TOTEM_UPDATE");