Skip to content

Commit 4768376

Browse files
committed
fix: achievement ranking
1 parent b3fda66 commit 4768376

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

Core/Metadata.lua

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,27 @@ W.OldInstances = {
8181
L["[ABBR] Vault of the Wardens"],
8282
}
8383

84-
---@type table<number, { id: number, priority: number, abbr: string, name: string, tex: number, idString: string }>
84+
---@type table<number, { id: number, difficulty: number, abbr: string, name: string, tex: number, idString: string }>
8585
W.MythicPlusSeasonAchievementData = {
86-
{ on = true, id = 61258, priority = 3, abbr = L["[ABBR] Midnight Keystone Legend: Season One"] },
87-
{ on = true, id = 61257, priority = 2, abbr = L["[ABBR] Midnight Keystone Hero: Season One"] },
88-
{ on = true, id = 61256, priority = 1, abbr = L["[ABBR] Midnight Keystone Master: Season One"] },
89-
{ on = true, id = 42172, priority = 3, abbr = L["[ABBR] The War Within Keystone Legend: Season Three"] },
90-
{ on = true, id = 42171, priority = 2, abbr = L["[ABBR] The War Within Keystone Hero: Season Three"] },
91-
{ on = true, id = 41973, priority = 1, abbr = L["[ABBR] The War Within Keystone Master: Season Three"] },
92-
{ on = true, id = 40954, priority = 4, abbr = L["[ABBR] Enterprising Hero: The War Within Season Two"] },
93-
{ on = false, id = 40952, priority = 2, abbr = L["[ABBR] The War Within Keystone Hero: Season Two"] },
94-
{ on = false, id = 41533, priority = 1, abbr = L["[ABBR] The War Within Keystone Master: Season Two"] },
95-
{ on = false, id = 20526, priority = 2, abbr = L["[ABBR] The War Within Keystone Hero: Season One"] },
96-
{ on = false, id = 20525, priority = 1, abbr = L["[ABBR] The War Within Keystone Master: Season One"] },
97-
{ on = false, id = 19783, priority = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season Four"] },
98-
{ on = false, id = 19782, priority = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season Four"] },
99-
{ on = false, id = 19012, priority = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season Three"] },
100-
{ on = false, id = 19011, priority = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season Three"] },
101-
{ on = false, id = 17845, priority = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season Two"] },
102-
{ on = false, id = 17844, priority = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season Two"] },
103-
{ on = false, id = 16650, priority = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season One"] },
104-
{ on = false, id = 16649, priority = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season One"] },
86+
{ on = true, id = 61258, difficulty = 3, abbr = L["[ABBR] Midnight Keystone Legend: Season One"] },
87+
{ on = true, id = 61257, difficulty = 2, abbr = L["[ABBR] Midnight Keystone Hero: Season One"] },
88+
{ on = true, id = 61256, difficulty = 1, abbr = L["[ABBR] Midnight Keystone Master: Season One"] },
89+
{ on = true, id = 42172, difficulty = 3, abbr = L["[ABBR] The War Within Keystone Legend: Season Three"] },
90+
{ on = true, id = 42171, difficulty = 2, abbr = L["[ABBR] The War Within Keystone Hero: Season Three"] },
91+
{ on = true, id = 41973, difficulty = 1, abbr = L["[ABBR] The War Within Keystone Master: Season Three"] },
92+
{ on = true, id = 40954, difficulty = 4, abbr = L["[ABBR] Enterprising Hero: The War Within Season Two"] },
93+
{ on = false, id = 40952, difficulty = 2, abbr = L["[ABBR] The War Within Keystone Hero: Season Two"] },
94+
{ on = false, id = 41533, difficulty = 1, abbr = L["[ABBR] The War Within Keystone Master: Season Two"] },
95+
{ on = false, id = 20526, difficulty = 2, abbr = L["[ABBR] The War Within Keystone Hero: Season One"] },
96+
{ on = false, id = 20525, difficulty = 1, abbr = L["[ABBR] The War Within Keystone Master: Season One"] },
97+
{ on = false, id = 19783, difficulty = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season Four"] },
98+
{ on = false, id = 19782, difficulty = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season Four"] },
99+
{ on = false, id = 19012, difficulty = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season Three"] },
100+
{ on = false, id = 19011, difficulty = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season Three"] },
101+
{ on = false, id = 17845, difficulty = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season Two"] },
102+
{ on = false, id = 17844, difficulty = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season Two"] },
103+
{ on = false, id = 16650, difficulty = 2, abbr = L["[ABBR] Dragonflight Keystone Hero: Season One"] },
104+
{ on = false, id = 16649, difficulty = 1, abbr = L["[ABBR] Dragonflight Keystone Master: Season One"] },
105105
}
106106

107107
-- https://www.wowhead.com/achievements/character-statistics/dungeons-and-raids/midnight/

Modules/Tooltips/Progression.lua

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,21 @@ local function SetProgressionInfo(tt, guid)
212212
end
213213

214214
sort(lines, function(a, b)
215-
local isDiff = db.specialAchievement.sortBy == "DIFFICULTY"
216-
217-
local primary = isDiff and (a[1] > b[1]) or (a[2] < b[2])
218-
local secondary = isDiff and (a[2] < b[2]) or (a[1] > b[1])
219-
local tie = isDiff and (a[1] == b[1]) or (a[2] == b[2])
220-
221-
return tie and secondary or primary
215+
if db.specialAchievement.sortBy == "DIFFICULTY" then
216+
if a[1] == b[1] then
217+
return a[2] < b[2]
218+
end
219+
return a[1] > b[1]
220+
else -- EXPANSION
221+
if a[2] == b[2] then
222+
return a[1] > b[1]
223+
end
224+
return a[2] < b[2]
225+
end
222226
end)
223227

228+
F.Developer.DevTool(lines, "Progression Special Achievement Lines")
229+
224230
for _, line in ipairs(lines) do
225231
tt:AddDoubleLine(line[3], line[4], nil, nil, nil, 1, 1, 1)
226232
end

Options/Tooltips.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ options.progression = {
425425
end,
426426
set = function(info, value)
427427
E.private.WT.tooltips.progression.specialAchievement.onlyCompleted = value
428+
E:StaticPopup_Show("PRIVATE_RL")
428429
end,
429430
disabled = function()
430431
return not (

0 commit comments

Comments
 (0)