4 local LoggingCombat = LoggingCombat;
5 local GetInstanceInfo = GetInstanceInfo;
6 local CTimerAfter = C_Timer.After;
7 local frame = CreateFrame("Frame", "OmaLogger");
14 [1594] = "The Undermine",
16 [1762] = "King's Rest",
17 [1763] = "Atal'Dazar",
19 [1822] = "Siege of Boralus",
21 [1862] = "Waycrest Manor",
22 [1864] = "Shrine of the Storm",
23 [1877] = "Temple of Sethraliss",
26 local function shouldLog()
27 local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo();
28 if zoneType == "raid" then print(mapID) end
29 if zoneType == "raid" and raidIDs[mapID] then
30 if difficulty == 17 then -- LFR
32 elseif difficulty == 16 then -- Mythic
34 elseif difficulty == 15 then -- Heroic
36 elseif difficulty == 14 then -- Normal
39 elseif zoneType == "party" and dungeonIDs[mapID] then
40 if difficulty == 8 or difficulty == 23 then
48 local prevLogging = nil;
49 local function updateZone()
50 local log = shouldLog();
53 print("<><><><><><><><><><><>");
54 print("Started Combat Log");
55 print("<><><><><><><><><><><>");
56 elseif prevLogging and LoggingCombat() then
57 print("<><><><><><><><><><><>");
58 print("Ended Combat Log");
59 print("<><><><><><><><><><><>");
64 frame:SetScript("OnEvent", function(self, event)
65 if event == "ZONE_CHANGED_NEW_AREA" then
66 CTimerAfter(3, updateZone);
67 elseif event == "CHALLENGE_MODE_START" then
68 CTimerAfter(1, updateZone);
71 frame:RegisterEvent("ZONE_CHANGED_NEW_AREA");
72 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+