Release 8.0.24 tracker and map fixes

This commit is contained in:
Rivi-s
2026-09-11 21:01:56 -07:00
parent edbfa248bf
commit 01899cc6ca
8 changed files with 136 additions and 15 deletions
+6
View File
@@ -1,5 +1,11 @@
# pfQuest base patch notes
## 8.0.24 — 2026-09-11
- Added level-first and nearest-objective sorting controls to the quest tracker.
- Made Ctrl-hide for minimap nodes react immediately in every refresh mode.
- Fixed stale world-map filter labels and zone state after browsing another map.
## 8.0.23 — 2026-09-11
- Added `/db version`, which reports the loaded pfQuest base version and Turtle extension version when installed.
+6
View File
@@ -120,6 +120,12 @@ pfQuest_defconfig = {
default = 1,
type = nil,
},
{
config = "trackerquestsort",
text = nil,
default = "level",
type = nil,
},
{ text = L["General"], default = nil, type = "header" },
{ text = L["Enable World Map Menu"], default = "1", type = "checkbox", config = "worldmapmenu" },
+22 -12
View File
@@ -1478,6 +1478,22 @@ function pfMap:UpdateMinimap()
return
end
-- Holding Ctrl over the minimap is an interaction gesture, not a normal map
-- refresh. Handle it before the selected refresh mode can defer work for
-- several hundred milliseconds, then force one redraw on release.
local hideMinimapNodes = controlkey.pressed and MouseIsOver(pfMap.drawlayer)
if hideMinimapNodes then
this.xPlayer = nil
this.minimapHiddenByCtrl = true
for _, pin in pairs(pfMap.mpins) do
pin:Hide()
end
return
elseif this.minimapHiddenByCtrl then
this.minimapHiddenByCtrl = nil
this.minimapTick = nil
end
-- Smooth preserves the original high-end behavior. The other modes reduce
-- repeated pin placement in dense areas, especially at wide minimap zoom.
local mZoom = pfMap.drawlayer:GetZoom()
@@ -1495,17 +1511,6 @@ function pfMap:UpdateMinimap()
end
this.minimapTick = GetTime() + interval
-- hide all minimap nodes while shift is pressed
if controlkey.pressed and MouseIsOver(pfMap.drawlayer) then
this.xPlayer = nil
for id, pin in pairs(pfMap.mpins) do
pin:Hide()
end
return
end
-- The 1.12 API reports the player in the coordinates of whichever World Map
-- view is currently selected. While a continent map is open that is not the
-- player's zone, so use the last real-zone position for minimap placement.
@@ -1902,7 +1907,12 @@ pfMap:SetScript("OnUpdate", function()
resetmap = true
elseif resetmap == true then
SetMapToCurrentZone()
pfMap.playerMapID = pfMap:GetPlayerMapID() or pfMap:GetMapID(GetCurrentMapContinent(), GetCurrentMapZone())
-- Do not call GetPlayerMapID here: it intentionally returns the cached
-- value first, which would preserve the map the player was browsing.
-- Read the client map context we just restored instead.
pfMap.playerMapID = pfMap:GetMapID(GetCurrentMapContinent(), GetCurrentMapZone())
or (GetRealZoneText and pfMap:GetMapIDByName(GetRealZoneText()))
pfMap:MarkMapVisited(pfMap.playerMapID)
resetmap = nil
end
+1 -1
View File
@@ -3,7 +3,7 @@
## Author: Shagu
## Notes: A Questhelper and Database
## Notes-ruRU: Облегченный помощник заданий и база данных
## Version: 8.0.21
## Version: 8.0.24
## OptionalDeps: pfUI-tbc
## SavedVariables: pfQuest_questcache
## SavedVariablesPerCharacter: pfQuest_config, pfBrowser_fav, pfQuest_history, pfQuest_colors, pfQuest_server, pfQuest_track
+1 -1
View File
@@ -3,7 +3,7 @@
## Author: Shagu
## Notes: A Questhelper and Database
## Notes-ruRU: Облегченный помощник заданий и база данных
## Version: 8.0.21
## Version: 8.0.24
## OptionalDeps: pfUI-wotlk
## SavedVariables: pfQuest_questcache
## SavedVariablesPerCharacter: pfQuest_config, pfBrowser_fav, pfQuest_history, pfQuest_colors, pfQuest_server, pfQuest_track
+1 -1
View File
@@ -3,7 +3,7 @@
## Author: Shagu, txtsd
## Notes: A Questhelper and Database
## Notes-ruRU: Облегченный помощник заданий и база данных
## Version: 8.0.23
## Version: 8.0.24
## OptionalDeps: pfUI
## SavedVariables: pfQuest_questcache, pfQuest_global
## SavedVariablesPerCharacter: pfQuest_config, pfBrowser_fav, pfQuest_history, pfQuest_colors, pfQuest_server, pfQuest_track
+9
View File
@@ -757,6 +757,15 @@ function pfQuest:AddWorldMapIntegration()
pfQuest.mapButton:SetPoint("TOPRIGHT", 0, -10)
pfQuest.mapButton:SetScript("OnShow", function()
pfQuest.mapButton.current = tonumber(pfQuest_config["trackingmethod"])
-- Version 8.0.23 briefly exposed a sixth filter while it was being
-- evaluated. It was removed before release, but that value can remain
-- in a test character's saved settings. A dropdown with no matching
-- entry keeps whatever text it last drew (often a zone name), so repair
-- the setting before building the menu.
if not pfQuest.mapButton.current or pfQuest.mapButton.current < 1 or pfQuest.mapButton.current > 5 then
pfQuest.mapButton.current = 1
pfQuest_config["trackingmethod"] = "1"
end
pfQuest.mapButton:UpdateMenu()
end)
+90
View File
@@ -85,6 +85,56 @@ end
local expand_states = {}
-- Ported from pfQuest-2: level-first remains the default, with an optional
-- nearest-objective order selected from the tracker header.
local function GetQuestSortMode()
return pfQuest_config["trackerquestsort"] == "distance" and "distance" or "level"
end
local DIST_FAR = 99999999
local function UpdateSortButton()
if not tracker or not tracker.btnsort then return end
if tracker.mode == "QUEST_TRACKING" then
tracker.btnsort:Show()
if GetQuestSortMode() == "distance" then
tracker.btnsort.label:SetText("N")
tracker.btnsort.tooltip = "Quest Sort: Nearest First\n|cff33ffcc<Click>|r Sort By Level"
else
tracker.btnsort.label:SetText("L")
tracker.btnsort.tooltip = "Quest Sort: Level First\n|cff33ffcc<Click>|r Sort By Nearest"
end
else
tracker.btnsort:Hide()
end
end
local function UpdateQuestDistances()
if tracker.mode ~= "QUEST_TRACKING" or GetQuestSortMode() ~= "distance" then return end
local changed, nearestByTitle = nil, {}
for _, data in ipairs((pfQuest.route and pfQuest.route.coords) or {}) do
local node, distance = data[3], data[4]
local title = node and node.title
if title and distance and (not nearestByTitle[title] or distance < nearestByTitle[title]) then
nearestByTitle[title] = distance
end
end
for _, button in pairs(tracker.buttons) do
if not button.empty then
local distance = nearestByTitle[button.title]
if button.distance ~= distance then
button.distance = distance
changed = true
end
elseif button.distance then
button.distance = nil
end
end
if changed then tracker.needsSort = true end
end
tracker = CreateFrame("Frame", "pfQuestMapTracker", UIParent)
tracker:Hide()
tracker:SetPoint("LEFT", UIParent, "LEFT", 0, 0)
@@ -152,6 +202,15 @@ tracker:SetScript("OnUpdate", function()
if pfQuestCompat.QuestWatchFrame:IsShown() then
pfQuestCompat.QuestWatchFrame:Hide()
end
if tracker.mode == "QUEST_TRACKING" and GetQuestSortMode() == "distance" then
if not this.distanceTick or this.distanceTick < GetTime() then
this.distanceTick = GetTime() + 0.2
UpdateQuestDistances()
end
else
this.distanceTick = nil
end
end)
-- Section collapse/expand emits QUEST_LOG_UPDATE. Refresh on that event
@@ -169,6 +228,7 @@ tracker:SetScript("OnEvent", function()
else
this:Show()
end
UpdateSortButton()
elseif event == "QUEST_LOG_UPDATE" then
this.sectionSignature = nil
this:ScheduleLayout()
@@ -249,19 +309,44 @@ do -- button panel
tracker.btnquest = CreateButton("quests", "TOPLEFT", pfQuest_Loc["Show Current Quests"], function()
tracker.mode = "QUEST_TRACKING"
UpdateSortButton()
pfMap:UpdateNodes()
end)
tracker.btndatabase = CreateButton("database", "TOPLEFT", pfQuest_Loc["Show Database Results"], function()
tracker.mode = "DATABASE_TRACKING"
UpdateSortButton()
pfMap:UpdateNodes()
end)
tracker.btngiver = CreateButton("giver", "TOPLEFT", pfQuest_Loc["Show Quest Givers"], function()
tracker.mode = "GIVER_TRACKING"
UpdateSortButton()
pfMap:UpdateNodes()
end)
tracker.btnsort = CreateFrame("Button", nil, tracker.panel)
tracker.btnsort:SetPoint("TOPRIGHT", -69, -1)
tracker.btnsort:SetWidth(panelheight - 2)
tracker.btnsort:SetHeight(panelheight - 2)
tracker.btnsort.tooltip = "Quest Sort"
tracker.btnsort.bg = tracker.btnsort:CreateTexture(nil, "BACKGROUND")
tracker.btnsort.bg:SetAllPoints()
tracker.btnsort.bg:SetTexture(0, 0, 0, 0)
tracker.btnsort.label = tracker.btnsort:CreateFontString(nil, "OVERLAY", "GameFontNormal")
tracker.btnsort.label:SetAllPoints()
tracker.btnsort.label:SetFont(pfUI.font_default, 11)
tracker.btnsort.label:SetTextColor(0.9, 0.9, 0.9, 1)
tracker.btnsort:SetScript("OnEnter", ShowTooltip)
tracker.btnsort:SetScript("OnLeave", HideTooltip)
tracker.btnsort:SetScript("OnClick", function()
pfQuest_config["trackerquestsort"] = GetQuestSortMode() == "distance" and "level" or "distance"
UpdateSortButton()
tracker.needsSort = true
tracker.distanceTick = 0
pfMap.queue_update = GetTime()
end)
tracker.btnclose = CreateButton("close", "TOPRIGHT", pfQuest_Loc["Close Tracker"], function()
DEFAULT_CHAT_FRAME:AddMessage(
pfQuest_Loc["|cff33ffccpf|cffffffffQuest: Tracker is now hidden. Type `/db tracker` to show."]
@@ -377,8 +462,13 @@ local function trackersort(a, b)
return false
elseif (a.tracked and 1 or -1) ~= (b.tracked and 1 or -1) then
return (a.tracked and 1 or -1) > (b.tracked and 1 or -1)
elseif tracker.mode == "QUEST_TRACKING" and GetQuestSortMode() == "distance"
and (a.distance or DIST_FAR) ~= (b.distance or DIST_FAR) then
return (a.distance or DIST_FAR) < (b.distance or DIST_FAR)
elseif (a.level or -1) ~= (b.level or -1) then
return (a.level or -1) > (b.level or -1)
elseif tracker.mode == "QUEST_TRACKING" and (a.distance or DIST_FAR) ~= (b.distance or DIST_FAR) then
return (a.distance or DIST_FAR) < (b.distance or DIST_FAR)
elseif (a.perc or -1) ~= (b.perc or -1) then
return (a.perc or -1) > (b.perc or -1)
elseif (a.title or "") ~= (b.title or "") then