4 local LoggingCombat = LoggingCombat;
5 local GetInstanceInfo = GetInstanceInfo;
6 local CTimerAfter = C_Timer.After;
7 local frame = CreateFrame("Frame", "OmaLogger");
12 [2070] = "Battle of Dazal'Alor",
13 [2096] = "Crucible of Storms",
14 [2164] = "The Eternal Palace",
18 [1594] = "The Undermine",
20 [1762] = "King's Rest",
21 [1763] = "Atal'Dazar",
23 [1822] = "Siege of Boralus",
25 [1862] = "Waycrest Manor",
26 [1864] = "Shrine of the Storm",
27 [1877] = "Temple of Sethraliss",
30 local function shouldLog()
31 local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo();
32 if zoneType == "raid" then print(mapID) end
33 if zoneType == "raid" and raidIDs[mapID] then
34 if difficulty == 17 then -- LFR
36 elseif difficulty == 16 then -- Mythic
38 elseif difficulty == 15 then -- Heroic
40 elseif difficulty == 14 then -- Normal
43 elseif zoneType == "party" and dungeonIDs[mapID] then
44 if difficulty == 8 or difficulty == 23 then
52 local prevLogging = nil;
53 local function updateZone()
54 local log = shouldLog();
57 print("<><><><><><><><><><><>");
58 print("Started Combat Log");
59 print("<><><><><><><><><><><>");
60 elseif prevLogging and LoggingCombat() then
61 print("<><><><><><><><><><><>");
62 print("Ended Combat Log");
63 print("<><><><><><><><><><><>");
68 frame:SetScript("OnEvent", function(self, event)
69 if event == "ZONE_CHANGED_NEW_AREA" then
70 CTimerAfter(3, updateZone);
71 elseif event == "CHALLENGE_MODE_START" then
72 CTimerAfter(1, updateZone);
75 frame:RegisterEvent("ZONE_CHANGED_NEW_AREA");
76 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+