@@ -49,6 +49,22 @@ local displayFormats = {
4949 eu_color = ' '
5050}
5151
52+ local allowID = { -- also has IDs maintained in Nameplate StyleFilters
53+ [2 ] = true , -- heroic
54+ [23 ] = true , -- mythic
55+ [148 ] = true , -- ZG/AQ40
56+ [174 ] = true , -- heroic (dungeon)
57+ [185 ] = true , -- normal (legacy)
58+ [198 ] = true , -- Classic: Season of Discovery
59+ [201 ] = true , -- Classic: Hardcore
60+ [215 ] = true , -- Classic: Sunken Temple
61+ }
62+
63+ local lfrID = {
64+ [7 ] = true ,
65+ [17 ] = true
66+ }
67+
5268local OnUpdate , db
5369
5470local function ToTime (start , seconds )
@@ -212,17 +228,14 @@ local function OnEnter()
212228 for i = 1 , GetNumSavedInstances () do
213229 local info = { GetSavedInstanceInfo (i ) } -- we want to send entire info
214230 local name , _ , _ , difficulty , locked , extended , _ , isRaid = unpack (info )
215- if name and (locked or extended ) then
216- local isDungeon = difficulty == 2 or difficulty == 23 or difficulty == 174 or difficulty == 198 or difficulty == 201
217- if isRaid or isDungeon then
218- local isLFR = difficulty == 7 or difficulty == 17
219- local _ , _ , isHeroic , _ , displayHeroic , displayMythic = GetDifficultyInfo (difficulty )
220- local sortName = name .. (displayMythic and 4 or (isHeroic or displayHeroic ) and 3 or isLFR and 1 or 2 )
221- local difficultyLetter = (displayMythic and difficultyTag [4 ]) or ((isHeroic or displayHeroic ) and difficultyTag [3 ]) or (isLFR and difficultyTag [1 ]) or difficultyTag [2 ]
222- local buttonImg = instanceIconByName [name ] and format (' |T%s:16:16:0:0:96:96:0:64:0:64|t ' , instanceIconByName [name ]) or ' '
223-
224- tinsert (lockedInstances [isRaid and ' raids' or ' dungeons' ], { sortName , difficultyLetter , buttonImg , info })
225- end
231+ if name and (locked or extended ) and (isRaid or allowID [difficulty ]) then
232+ local isLFR = lfrID [difficulty ]
233+ local _ , _ , isHeroic , _ , displayHeroic , displayMythic = GetDifficultyInfo (difficulty )
234+ local sortName = name .. (displayMythic and 4 or (isHeroic or displayHeroic ) and 3 or isLFR and 1 or 2 )
235+ local difficultyLetter = (displayMythic and difficultyTag [4 ]) or ((isHeroic or displayHeroic ) and difficultyTag [3 ]) or (isLFR and difficultyTag [1 ]) or difficultyTag [2 ]
236+ local buttonImg = instanceIconByName [name ] and format (' |T%s:16:16:0:0:96:96:0:64:0:64|t ' , instanceIconByName [name ]) or ' '
237+
238+ tinsert (lockedInstances [isRaid and ' raids' or ' dungeons' ], { sortName , difficultyLetter , buttonImg , info })
226239 end
227240 end
228241
0 commit comments