feat(tracker): add "By Zone + % Complete" sort options

Groups quests by zone with headers, then orders each zone's quests by
completion percent (completes on top / bottom in the reversed variant).
This commit is contained in:
2026-07-19 17:22:53 +02:00
parent 190d2b0d5e
commit 9da949dd66
4 changed files with 43 additions and 3 deletions
@@ -864,6 +864,12 @@ local trackerOptionsLocales = {
["esES"] = "Por zona",
["frFR"] = "Par zone",
},
["By Zone + %% Complete"] = {
["enUS"] = true,
},
["By Zone + %% Complete (Reversed)"] = {
["enUS"] = true,
},
["By Zone Prox"] = {
["ptBR"] = "Por proximidade de zona",
["ruRU"] = "По дальности зоны",
@@ -402,6 +402,8 @@ function QuestieOptions.tabs.tracker:Initialize()
['byProximity'] = l10n('By Proximity'),
['byProximityReversed'] = l10n('By Proximity (Reversed)'),
['byZone'] = l10n('By Zone'),
['byZoneComplete'] = l10n('By Zone + %% Complete'),
['byZoneCompleteReversed'] = l10n('By Zone + %% Complete (Reversed)'),
['byZonePlayerProximity'] = l10n('By Zone Prox'),
['byZonePlayerProximityReversed'] = l10n('By Zone Prox (Reversed)'),
}
+29 -1
View File
@@ -706,7 +706,7 @@ local function _GetZoneName(zoneOrSort, questId, zoneNameOverride)
if not zoneOrSort then return "Unknown Zone" end
local zoneName
local sortObj = Questie.db.profile.trackerSortObjectives
if sortObj == "byZone" or sortObj == "byZonePlayerProximity" or sortObj == "byZonePlayerProximityReversed" then
if sortObj == "byZone" or sortObj == "byZoneComplete" or sortObj == "byZoneCompleteReversed" or sortObj == "byZonePlayerProximity" or sortObj == "byZonePlayerProximityReversed" then
if (zoneOrSort) > 0 then
zoneName = TrackerUtils:GetZoneNameByID(zoneOrSort)
if not zoneName or zoneName == "Unknown Zone" then
@@ -964,6 +964,34 @@ function TrackerUtils:GetSortedQuestIds()
end
end
end)
elseif sortObj == "byZoneComplete" or sortObj == "byZoneCompleteReversed" then
table.sort(sortedQuestIds, function(a, b)
local qAZone = questDetails[a].zoneName
local qBZone = questDetails[b].zoneName
-- Sort by Zone first, then by % Complete within each zone
-- (byZoneComplete: completes at top, 0% at bottom; reversed: opposite)
if qAZone == qBZone then
local vA, vB = questDetails[a].questCompletePercent, questDetails[b].questCompletePercent
if vA == vB then
local qA = questDetails[a].quest
local qB = questDetails[b].quest
return qA and qB and qA.level < qB.level
end
if sortObj == "byZoneComplete" then
return vA > vB
else
return vA < vB
end
else
if qAZone ~= nil and qBZone ~= nil then
return qAZone < qBZone
else
return qAZone and qBZone
end
end
end)
elseif sortObj == "byZonePlayerProximity" or sortObj == "byZonePlayerProximityReversed" then
local toSort = {}
local continent = _GetContinent(C_Map.GetBestMapForUnit("player"))
+6 -2
View File
@@ -1,9 +1,9 @@
# Questie-X
Fork of [aron-w/Questie-X](https://github.com/aron-w/Questie-X) with bug fixes.
Fork of [aron-w/Questie-X](https://github.com/aron-w/Questie-X) with bug fixes and personal changes.
Made for and tested on CoA, but it should also work on other 3.3.5 clients.
## Changes in this fork
## Fixes
- fixed world map icons offset due to Ascension's objective frame and zoom addons like Magnify.
- fixed tracker objectives not updating correctly.
@@ -12,6 +12,10 @@ Made for and tested on CoA, but it should also work on other 3.3.5 clients.
- fixed custom quests not showing (complete) in the tracker.
- fixed custom quest items not showing.
## Changes
- added "By Zone + %% Completed" and "By Zone + %% Completed (Reversed)" tracker sorting options.
## Credits
[aron-w/Questie-X](https://github.com/aron-w/Questie-X)<br>