4 local LoggingCombat = LoggingCombat;
5 local GetInstanceInfo = GetInstanceInfo;
6 local CTimerAfter = C_Timer.After;
7 local frame = CreateFrame("Frame", "OmaLogger");
12 --local minDungMapID = 1456;
14 local function shouldLog()
15 local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo();
16 if zoneType == "raid" then print(mapID) end
17 if zoneType == "raid" and raidIDs[mapID] then
18 if difficulty == 17 then -- LFR
20 elseif difficulty == 16 then -- Mythic
22 elseif difficulty == 15 then -- Heroic
24 elseif difficulty == 14 then -- Normal
27 --elseif zoneType == "party" and mapID >= minDungMapID then
28 -- if difficulty == 8 or difficulty == 23 then
36 local prevLogging = nil;
37 local function updateZone()
38 local log = shouldLog();
41 print("<><><><><><><><><><><>");
42 print("Started Combat Log");
43 print("<><><><><><><><><><><>");
44 elseif prevLogging and LoggingCombat() then
45 print("<><><><><><><><><><><>");
46 print("Ended Combat Log");
47 print("<><><><><><><><><><><>");
52 frame:SetScript("OnEvent", function(self, event)
53 if event == "ZONE_CHANGED_NEW_AREA" then
54 CTimerAfter(3, updateZone);
55 elseif event == "CHALLENGE_MODE_START" then
56 CTimerAfter(1, updateZone);
59 frame:RegisterEvent("ZONE_CHANGED_NEW_AREA");
60 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+