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",
17 [1594] = "The Undermine",
19 [1762] = "King's Rest",
20 [1763] = "Atal'Dazar",
22 [1822] = "Siege of Boralus",
24 [1862] = "Waycrest Manor",
25 [1864] = "Shrine of the Storm",
26 [1877] = "Temple of Sethraliss",
29 local function shouldLog()
30 local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo();
31 if zoneType == "raid" then print(mapID) end
32 if zoneType == "raid" and raidIDs[mapID] then
33 if difficulty == 17 then -- LFR
35 elseif difficulty == 16 then -- Mythic
37 elseif difficulty == 15 then -- Heroic
39 elseif difficulty == 14 then -- Normal
42 elseif zoneType == "party" and dungeonIDs[mapID] then
43 if difficulty == 8 or difficulty == 23 then
51 local prevLogging = nil;
52 local function updateZone()
53 local log = shouldLog();
56 print("<><><><><><><><><><><>");
57 print("Started Combat Log");
58 print("<><><><><><><><><><><>");
59 elseif prevLogging and LoggingCombat() then
60 print("<><><><><><><><><><><>");
61 print("Ended Combat Log");
62 print("<><><><><><><><><><><>");
67 frame:SetScript("OnEvent", function(self, event)
68 if event == "ZONE_CHANGED_NEW_AREA" then
69 CTimerAfter(3, updateZone);
70 elseif event == "CHALLENGE_MODE_START" then
71 CTimerAfter(1, updateZone);
74 frame:RegisterEvent("ZONE_CHANGED_NEW_AREA");
75 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+