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