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",
13 [2296] = "Castle Nathria",
16 [1594] = "The Undermine",
18 [1762] = "King's Rest",
19 [1763] = "Atal'Dazar",
21 [1822] = "Siege of Boralus",
23 [1862] = "Waycrest Manor",
24 [1864] = "Shrine of the Storm",
25 [1877] = "Temple of Sethraliss",
28 local function shouldLog()
29 local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo();
30 if zoneType == "raid" then print(mapID) end
31 if zoneType == "raid" and raidIDs[mapID] then
32 if difficulty == 17 then -- LFR
34 elseif difficulty == 16 then -- Mythic
36 elseif difficulty == 15 then -- Heroic
38 elseif difficulty == 14 then -- Normal
41 elseif zoneType == "party" and dungeonIDs[mapID] then
42 if difficulty == 8 or difficulty == 23 then
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" or event == "PLAYER_LOGIN" 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("PLAYER_LOGIN");
75 --frame:RegisterEvent("CHALLENGE_MODE_START"); -- for logging M+