diff --git a/ElvUI/Core/Modules/DataTexts/Difficulty.lua b/ElvUI/Core/Modules/DataTexts/Difficulty.lua index 9cc776b28e..a610122d42 100644 --- a/ElvUI/Core/Modules/DataTexts/Difficulty.lua +++ b/ElvUI/Core/Modules/DataTexts/Difficulty.lua @@ -50,7 +50,7 @@ local DiffIDLabel = { -- also has IDs maintained in Nameplate StyleFilters ['N'] = { 1, 14, 38, 173, 198, 201 }, ['H'] = { 2, 15, 39, 174 }, ['M'] = { 16, 23, 40 }, - ['20'] = { 148, 185 }, + ['20'] = { 148, 185, 215 }, ['10N'] = { 3, 175 }, ['25N'] = { 4, 176 }, ['10H'] = { 5, 193 }, diff --git a/ElvUI/Core/Modules/DataTexts/Time.lua b/ElvUI/Core/Modules/DataTexts/Time.lua index e9b77aa863..69db83de49 100644 --- a/ElvUI/Core/Modules/DataTexts/Time.lua +++ b/ElvUI/Core/Modules/DataTexts/Time.lua @@ -49,6 +49,22 @@ local displayFormats = { eu_color = '' } +local allowID = { -- also has IDs maintained in Nameplate StyleFilters + [2] = true, -- heroic + [23] = true, -- mythic + [148] = true, -- ZG/AQ40 + [174] = true, -- heroic (dungeon) + [185] = true, -- normal (legacy) + [198] = true, -- Classic: Season of Discovery + [201] = true, -- Classic: Hardcore + [215] = true, -- Classic: Sunken Temple +} + +local lfrID = { + [7] = true, + [17] = true +} + local OnUpdate, db local function ToTime(start, seconds) @@ -212,17 +228,14 @@ local function OnEnter() for i = 1, GetNumSavedInstances() do local info = { GetSavedInstanceInfo(i) } -- we want to send entire info local name, _, _, difficulty, locked, extended, _, isRaid = unpack(info) - if name and (locked or extended) then - local isDungeon = difficulty == 2 or difficulty == 23 or difficulty == 174 or difficulty == 198 or difficulty == 201 - if isRaid or isDungeon then - local isLFR = difficulty == 7 or difficulty == 17 - local _, _, isHeroic, _, displayHeroic, displayMythic = GetDifficultyInfo(difficulty) - local sortName = name .. (displayMythic and 4 or (isHeroic or displayHeroic) and 3 or isLFR and 1 or 2) - local difficultyLetter = (displayMythic and difficultyTag[4]) or ((isHeroic or displayHeroic) and difficultyTag[3]) or (isLFR and difficultyTag[1]) or difficultyTag[2] - local buttonImg = instanceIconByName[name] and format('|T%s:16:16:0:0:96:96:0:64:0:64|t ', instanceIconByName[name]) or '' - - tinsert(lockedInstances[isRaid and 'raids' or 'dungeons'], { sortName, difficultyLetter, buttonImg, info }) - end + if name and (locked or extended) and (isRaid or allowID[difficulty]) then + local isLFR = lfrID[difficulty] + local _, _, isHeroic, _, displayHeroic, displayMythic = GetDifficultyInfo(difficulty) + local sortName = name .. (displayMythic and 4 or (isHeroic or displayHeroic) and 3 or isLFR and 1 or 2) + local difficultyLetter = (displayMythic and difficultyTag[4]) or ((isHeroic or displayHeroic) and difficultyTag[3]) or (isLFR and difficultyTag[1]) or difficultyTag[2] + local buttonImg = instanceIconByName[name] and format('|T%s:16:16:0:0:96:96:0:64:0:64|t ', instanceIconByName[name]) or '' + + tinsert(lockedInstances[isRaid and 'raids' or 'dungeons'], { sortName, difficultyLetter, buttonImg, info }) end end diff --git a/ElvUI/Core/Modules/Misc/RaidUtility.lua b/ElvUI/Core/Modules/Misc/RaidUtility.lua index 5501529a86..beeccc2e28 100644 --- a/ElvUI/Core/Modules/Misc/RaidUtility.lua +++ b/ElvUI/Core/Modules/Misc/RaidUtility.lua @@ -77,7 +77,7 @@ function RU:SetEnabled(button, enabled, isLeader) if button.SetChecked then button:SetChecked(enabled) else - button:SetEnabled(enabled) + button.enabled = enabled end if button.Text then -- show text grey when isLeader is false, nil and true should be white @@ -295,7 +295,7 @@ function RU:OnEvent_ReadyCheckButton() end function RU:OnClick_ReadyCheckButton() - if RU:InGroup() then + if self.enabled and RU:InGroup() then DoReadyCheck() end end @@ -305,7 +305,7 @@ function RU:OnEvent_RoleCheckButton() end function RU:OnClick_RoleCheckButton() - if RU:InGroup() then + if self.enabled and RU:InGroup() then InitiateRolePoll() end end diff --git a/ElvUI/Core/Modules/Nameplates/StyleFilter.lua b/ElvUI/Core/Modules/Nameplates/StyleFilter.lua index 083cd7e6d0..4e65e06aec 100644 --- a/ElvUI/Core/Modules/Nameplates/StyleFilter.lua +++ b/ElvUI/Core/Modules/Nameplates/StyleFilter.lua @@ -143,6 +143,7 @@ NP.TriggerConditions = { [174] = 'heroic', [185] = 'legacy20normal', [186] = 'legacy40normal', + [215] = 'normal', -- Classic: Sunken Temple -- wotlk [175] = 'legacy10normal', [176] = 'legacy25normal', diff --git a/ElvUI/Core/Modules/UnitFrames/UnitFrames.lua b/ElvUI/Core/Modules/UnitFrames/UnitFrames.lua index c0a51ea45c..0c3e1b13c8 100644 --- a/ElvUI/Core/Modules/UnitFrames/UnitFrames.lua +++ b/ElvUI/Core/Modules/UnitFrames/UnitFrames.lua @@ -556,7 +556,7 @@ do -- IDs maintained in Difficulty Datatext and Nameplate StyleFilters dungeonHeroic = {2, 39, 174}, dungeonMythic = {23, 40}, dungeonMythicKeystone = {8}, - raidNormal = {3, 4, 14, 148, 175, 176, 185, 186}, -- 148 is ZG/AQ40 + raidNormal = {3, 4, 14, 148, 175, 176, 185, 186, 215}, -- 148 is ZG/AQ40, 215 is Sunken Temple raidHeroic = {5, 6, 15, 193, 194}, raidMythic = {16}, }