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, "alert"}, -- Void Lash (Zek'voz)
22 -- Battle of Dazar'alor
23 [285213] = {1, "alert"}, -- Caress of Death (Rastakhan)
24 [285195] = {12, "heal"}, -- Deathly Withering (Rastakhan)
27 local auraEvents = {};
28 auraEvents.SPELL_AURA_APPLIED = function(frame, id, _, _, _, amount)
29 if (amount == nil and watchedAuras[id][1] == 1) or (amount ~= nil and amount >= watchedAuras[id][1]) then
30 if watchedAuras[id][2] == "alert" then
31 frame.alert[id] = true;
33 frame.heal[id] = true;
37 auraEvents.SPELL_AURA_APPLIED_DOSE = auraEvents.SPELL_AURA_APPLIED;
38 auraEvents.SPELL_AURA_REFRESH = auraEvents.SPELL_AURA_APPLIED;
39 auraEvents.SPELL_AURA_REMOVED = function(frame, id, _, _, _, amount)
40 if amount == nil or amount == 0 then
41 if watchedAuras[id][2] == "alert" then
42 frame.alert[id] = nil;
48 auraEvents.SPELL_AURA_REMOVED_DOSE = auraEvents.SPELL_AURA_REMOVED;
49 auraEvents.SPELL_AURA_BROKEN = function(frame, id)
50 return auraEvents.SPELL_AURA_REMOVED(frame, id, nil, nil, nil, 0);
52 auraEvents.SPELL_AURA_BROKEN_SPELL = auraEvents.SPELL_AURA_BROKEN;
55 local function clog(ts, event, _, _, _, _, _, dest, _, flags, _, spellid, ...)
56 if auraEvents[event] and watchedAuras[spellid] and guids[dest] then
57 auraEvents[event](guids[dest], spellid, ...);
60 addon.Events.Clog = clog;
62 local frame = CreateFrame("Frame");
64 frame:SetScript("OnEvent", function()
65 frame:UnregisterAllEvents();
66 frame:SetScript("OnEvent", function()
67 return clog(CombatLogGetCurrentEventInfo());
69 frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
71 frame:RegisterEvent("PLAYER_LOGIN");