<<
path:
root/public/nswa.git/html/nswa_dungeon_difficulty.lua
blob: ba44a5b9a146595ab8fb91fb4d735c17e9d7c5af
[raw]
[clear marker]
2local already_warned = false
5local function check_dungeon_difficulty()
6 if IsInRaid() then return end
7 if not IsInGroup() then return end
8 if already_warned then return end
10 local difficulty_id = GetDungeonDifficultyID()
13 if difficulty_id ~= 23 then
14 local text = "[Alert]: Dungeon difficulty is currently not set to Mythic."
15 print("NSWA: " .. text)
16 SendChatMessage(text, "PARTY")
21local function delayed_check()
22 C_Timer.After(1, function()
23 check_dungeon_difficulty()
27local function reset_state()
28 already_warned = false
31local frame = CreateFrame("Frame")
33frame:RegisterEvent("GROUP_ROSTER_UPDATE")
34frame:RegisterEvent("PLAYER_ENTERING_WORLD")
36frame:SetScript("OnEvent", function(self, event)
37 if event == "GROUP_ROSTER_UPDATE" then
38 if not IsInGroup() then
43 elseif event == "PLAYER_ENTERING_WORLD" then