4 local LoggingCombat = LoggingCombat;
5 local GetInstanceInfo = GetInstanceInfo;
6 local CTimerAfter = C_Timer.After;
7 local frame = CreateFrame("Frame", "OmaLogger");
10 local minRaidMapID = 1520;
11 --local minDungMapID = 1456;
13 local function shouldLog()
14 local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo();
15 if zoneType == "raid" and mapID >= minRaidMapID then
16 if difficulty == 17 then -- LFR
18 elseif difficulty == 16 then -- Mythic
20 elseif difficulty == 15 then -- Heroic
22 elseif difficulty == 14 then -- Normal
25 --elseif zoneType == "party" and mapID >= minDungMapID then
26 -- if difficulty == 8 or difficulty == 23 then
34 local prevLogging = nil;
35 local function updateZone()
36 local log = shouldLog();
39 print("<><><><><><><><><><><>");
40 print("Started Combat Log");
41 print("<><><><><><><><><><><>");
42 elseif prevLogging and LoggingCombat() then
43 print("<><><><><><><><><><><>");
44 print("Ended Combat Log");
45 print("<><><><><><><><><><><>");
50 frame:SetScript("OnEvent", function(self, event)
51 if event == "ZONE_CHANGED_NEW_AREA" then
52 CTimerAfter(3, updateZone);
53 elseif event == "CHALLENGE_MODE_START" then
54 CTimerAfter(1, updateZone);
57 frame:RegisterEvent("ZONE_CHANGED_NEW_AREA");
58 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+