1e0cd8d - Add slash cmd to get auras from unit
[wowui.git] / OmaTMW / XaneshLine.lua
1 -- XaneshLine.lua
2 local _;
3 local line = CreateFrame("Frame", "OmaLine", UIParent);
4 local playerGuid = nil;
5
6 local function clog(ts, event, _, _, _, _, _, dest, _, _, _, spellid, ...)
7     if event == "SPELL_AURA_APPLIED" and spellid == 312406 and dest == playerGuid then
8         line:Show();
9     elseif event == "SPELL_AURA_REMOVED" and spellid == 312406 and dest == playerGuid then
10         line:Hide();
11     end
12 end
13
14 local function lineConf()
15     line:SetPoint("CENTER", UIParent, "CENTER", 0, 100);
16     line:SetHeight(350);
17     line:SetWidth(5);
18     line.base = line:CreateTexture(nil, "BACKGROUND");
19     line.base:SetAllPoints();
20     line.base:SetColorTexture(1, 1, 1, 0.85);
21     line:Hide();
22
23     playerGuid = UnitGUID("player");
24     line:UnregisterAllEvents();
25     line:SetScript("OnEvent", function()
26         return clog(CombatLogGetCurrentEventInfo());
27     end);
28     line:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
29 end
30
31 line:SetScript("OnEvent", lineConf);
32 line:RegisterEvent("PLAYER_LOGIN");