local already_warned = false local function check_dungeon_difficulty() if IsInRaid() then return end if not IsInGroup() then return end if already_warned then return end local difficulty_id = GetDungeonDifficultyID() -- 23 = Mythic if difficulty_id ~= 23 then local text = "[Alert]: Dungeon difficulty is currently not set to Mythic." print("NSWA: " .. text) SendChatMessage(text, "PARTY") already_warned = true end end local function delayed_check() C_Timer.After(1, function() check_dungeon_difficulty() end) end local function reset_state() already_warned = false end local frame = CreateFrame("Frame") frame:RegisterEvent("GROUP_ROSTER_UPDATE") frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:SetScript("OnEvent", function(self, event) if event == "GROUP_ROSTER_UPDATE" then if not IsInGroup() then reset_state() else delayed_check() end elseif event == "PLAYER_ENTERING_WORLD" then delayed_check() end end)