View Single Post
11-09-17, 04:41 AM   #15
stianhoiland
A Kobold Labourer
Join Date: Nov 2017
Posts: 1
Annika:

This one took a while to track down, but I figured it out.

There is some code in Interface/AddOns/Blizzard_ObjectiveTracker/Blizzard_QuestObjectiveTracker.lua that constantly effectively checks GetSuperTrackedQuestID(), and if it's 0 (which is what we set it to every time SetSuperTrackedQuestID() is called) it is deemed invalid and the closest quest is calculated and SetSuperTrackedQuestID() is called with that quest's questID.

Since the code in Blizzard_QuestObjectiveTracker.lua constantly checks, we get a call to SetSuperTrackedQuestID() probably every frame, since we immediately override by setting it to 0 again:

Lua Code:
  1. hooksecurefunc('SetSuperTrackedQuestID', function(questID)
  2.   if questID ~= 0 then
  3.     SetSuperTrackedQuestID(0)
  4.   end
  5. end)

The reason this prevents viewing quest details is that Interface/FrameXML/WorldMapFrame.lua listenes for the SUPER_TRACKED_QUEST_CHANGED event and calls QuestMapFrame_CloseQuestDetails() every time SUPER_TRACKED_QUEST_CHANGED, which is constantly since our code is pinging back and forth with Blizzard's.

To fix this we override the Blizzard function which calls QuestSuperTracking_ChooseClosestQuest():
Lua Code:
  1. QuestSuperTracking_CheckSelection = function()
  2.   return
  3. end
We could also have overridden another immediately relevant function called QuestSuperTracking_IsSuperTrackedQuestValid(), but we don't need to.

EDIT:

As a side note, you can also remove the golden minimap arrow by putting an empty .blp called SuperTrackerArrow.blp in Interface/Minimap. This might be the way forward if Blizzard keeps doing smart things

Last edited by stianhoiland : 11-09-17 at 04:54 AM.
  Reply With Quote