Skip to content

Commit

Permalink
add sunken temple difficulty id
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Apr 17, 2024
1 parent d798dad commit e6d9c23
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ElvUI/Core/Modules/DataTexts/Difficulty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
35 changes: 24 additions & 11 deletions ElvUI/Core/Modules/DataTexts/Time.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions ElvUI/Core/Modules/Nameplates/StyleFilter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ NP.TriggerConditions = {
[174] = 'heroic',
[185] = 'legacy20normal',
[186] = 'legacy40normal',
[215] = 'normal', -- Classic: Sunken Temple
-- wotlk
[175] = 'legacy10normal',
[176] = 'legacy25normal',
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Core/Modules/UnitFrames/UnitFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down

0 comments on commit e6d9c23

Please sign in to comment.