2e5bc88 - Working override/vehicle/possess bars
[wowui.git] / OmaUF / Auras.lua
index 95ef2c6..90da28d 100644 (file)
@@ -18,7 +18,7 @@ local function updateTooltip(frame)
 end
 
 local function showTooltip(frame)
-    -- tooltip handling from TargetFrame.xml
+    -- tooltip handling from FrameXML/TargetFrame.xml
     GameTooltip:SetOwner(frame, "ANCHOR_BOTTOMRIGHT", 15, -25);
     GameTooltip:SetUnitAura(frame.unit, frame.index, frame.filter);
     frame:SetScript("OnUpdate", updateTooltip);
@@ -40,7 +40,7 @@ local function createAura(parent, prev, anchor, name, unit)
     aura.cd:SetReverse(true);
     aura.cd:SetHideCountdownNumbers(true);
     aura.cd:SetAllPoints();
-    aura.unit = unit;
+    aura.unit = unit; -- TODO add aura.stack text
     aura:SetScript("OnEnter", showTooltip);
     aura:SetScript("OnLeave", hideTooltip);
     aura:Hide();
@@ -77,7 +77,6 @@ end
 
 function M.UpdateAuras(frame, unit)
     local auras = frame.auras;
-    if not auras then return end
     for _, aura in ipairs(auras) do
         if not aura:IsShown() then break end
         aura:Hide();
@@ -89,6 +88,7 @@ function M.UpdateAuras(frame, unit)
         while true do
             _, _, icon, count, _, duration, expires, caster, _, _, id = UnitAura(unit, i, filter);
             if not id or not auras[pos] then break end
+            -- aura filter self-applied, player-applied, list of important auras TODO
             local aura = auras[pos];
             aura.icon:SetTexture(icon);
             aura.index = i;