2 -- 2019 Aleksi Blinnikka
4 local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo;
6 local guids = addon.FrameGuids;
8 --[286988] = duration, -- Searing Embers
9 --[257908] = {bar=false}, -- Oiled Blade
10 --[268391] = {bar=false}, -- Mental Assault
11 --[272571] = {bar=false}, -- Choking Waters
12 --[268008] = {bar=false}, -- Snake Charm
13 --[260741] = {bar=false}, -- Jagged Nettles
14 --[280605] = {bar=false}, -- Brain Freeze
15 --[268797] = {bar=false}, -- Transmute to Goo
16 --[265889] = {bar=false}, -- Torch Strike
17 --[266209] = {bar=false}, -- Wicked Frenzy
18 --[258323] = {bar=false}, -- Infected Wound
19 --[262513] = {bar=false}, -- Azerite Heartseeker
21 [265264] = 2, -- Void Lash (Zek'voz)
22 -- Battle of Dazar'alor
23 [285213] = 1, -- Caress of Death (Rastakhan)
26 local auraEvents = {};
27 auraEvents.SPELL_AURA_APPLIED = function(frame, id, _, _, _, amount)
28 if amount == nil or amount >= watchedAuras[id] then
29 frame.alert[id] = true;
32 auraEvents.SPELL_AURA_APPLIED_DOSE = auraEvents.SPELL_AURA_APPLIED;
33 auraEvents.SPELL_AURA_REFRESH = auraEvents.SPELL_AURA_APPLIED;
34 auraEvents.SPELL_AURA_REMOVED = function(frame, id, _, _, _, amount)
35 if amount == nil or amount == 0 then
36 frame.alert[id] = nil;
39 auraEvents.SPELL_AURA_REMOVED_DOSE = auraEvents.SPELL_AURA_REMOVED;
40 auraEvents.SPELL_AURA_BROKEN = function(frame, id)
41 return auraEvents.SPELL_AURA_REMOVED(frame, id, nil, nil, nil, 0);
43 auraEvents.SPELL_AURA_BROKEN_SPELL = auraEvents.SPELL_AURA_BROKEN;
46 local function clog(ts, event, _, _, _, _, _, dest, _, flags, _, spellid, ...)
47 if auraEvents[event] and watchedAuras[spellid] and guids[dest] then
48 auraEvents[event](guids[dest], spellid, ...);
51 addon.Events.Clog = clog;
53 local frame = CreateFrame("Frame");
55 frame:SetScript("OnEvent", function()
56 frame:UnregisterAllEvents();
57 frame:SetScript("OnEvent", function()
58 return clog(CombatLogGetCurrentEventInfo());
60 frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
62 frame:RegisterEvent("PLAYER_LOGIN");