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
42 elseif difficulty == 1 or difficulty == 2 then
43 return true; -- TODO remove logging from normal/hc after beta
50 local prevLogging = nil;
51 local function updateZone()
52 local log = shouldLog();
55 print("<><><><><><><><><><><>");
56 print("Started Combat Log");
57 print("<><><><><><><><><><><>");
58 elseif prevLogging and LoggingCombat() then
59 print("<><><><><><><><><><><>");
60 print("Ended Combat Log");
61 print("<><><><><><><><><><><>");
66 frame:SetScript("OnEvent", function(self, event)
67 if event == "ZONE_CHANGED_NEW_AREA" then
68 CTimerAfter(3, updateZone);
69 elseif event == "CHALLENGE_MODE_START" then
70 CTimerAfter(1, updateZone);
73 frame:RegisterEvent("ZONE_CHANGED_NEW_AREA");
74 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+