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