feat(tracker): add objective marker button to quest lines
Ascension's client backports retail's floating objective marker. This adds a button to each tracker quest line that points the marker at that quest, mirroring the quest pin the world map draws for it. Supertracking is a slave of the map's quest selection: both the map and the Blizzard watch frame funnel through SelectQuestLogEntry, and calling C_SuperTrack.SetSuperTrackedQuestID directly only moves the marker until the next map interaction stomps it. So the button clicks the same POI frame the client clicks -- the watch frame button when one exists, otherwise the map's quest frame. The client dropped GetSuperTrackedQuestID, so the current quest is read by hooking SetSuperTrackedQuestID instead. Every path ends up there, including the automatic re-pick on zone change, so the highlight cannot fall out of sync with tracking changed outside the addon. Caching what we last set would have gone stale the moment the player used the map. The button mirrors the pin's own textures rather than picking atlas cells, so the digit, the "?" completed quests use and the selected variant all follow whatever the client draws. Quests with no pin get no button, and the map's POI frames are built on demand so buttons appear without opening the map. Adds trackerShowSuperTrackButton and trackerSuperTrackButtonSize.
This commit is contained in:
@@ -335,6 +335,10 @@ function QuestieTracker.Initialize()
|
||||
Questie.db.profile.trackerSetpoint = "TOPLEFT"
|
||||
end
|
||||
|
||||
-- Tracks what the client considers supertracked. Permanent by design: hooksecurefunc cannot be
|
||||
-- undone, and the value has to stay correct even while the Questie tracker is disabled.
|
||||
TrackerUtils:InitSuperTrackHook()
|
||||
|
||||
if (not Questie.db.profile.trackerEnabled) then
|
||||
-- The Tracker is disabled, no need to continue
|
||||
return
|
||||
@@ -1093,6 +1097,10 @@ function QuestieTracker:Update()
|
||||
-- Adds the AI_VoiceOver Play Buttons
|
||||
line.playButton:SetPlayButton(questId)
|
||||
|
||||
-- Adds the button that points the floating objective marker at this quest.
|
||||
-- Must run after SetPlayButton, since it anchors around the play button.
|
||||
line.superTrackButton:SetSuperTrackButton(questId)
|
||||
|
||||
local usableQIB = false
|
||||
local sourceItemId = QuestieDB.QueryQuestSingle(quest.Id, "sourceItemId")
|
||||
local isLiveSourceItem = false
|
||||
|
||||
Reference in New Issue
Block a user