WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Hiding Minimap Quest Arrow (https://www.wowinterface.com/forums/showthread.php?t=50147)

Annika 10-17-14 01:35 PM

Hiding Minimap Quest Arrow
 
Hi everyone,

I'm not sure if it's the done thing to make a thread asking for help as your first post, but this is driving me up the wall. Very simply, I'm looking for a way to hide the gold arrow that points to quest objectives, or, if that's not possible removing the entire minimap cluster (think this can be done with MoveAnything) and then getting a minimap replacement which roughly mirrors the hunter and gatherer tracking of the original.

Any help would be gratefully received, I really, really hate this thing! :banana:

semlar 10-17-14 01:56 PM

It's built into the minimap. Your only option, aside from physically replacing the arrow texture (which I don't think even works), is to un-track the quest it's pointing to.

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

Annika 10-17-14 02:00 PM

Thanks for your reply! None of the quests it's pointing to are tracked in the Quest Tracking thing, if that's what you mean?

I'll be completely honest here and admit that I have no idea what you've just given me. I've only today discovered add-ons, in an attempt to get rid of this cursed thing, ahem... Any chance you could tell me what I'm googling so I can try to apply it? Again, much appreciated!

semlar 10-17-14 02:03 PM

Alright, just paste that script into http://addon.bool.no and it'll generate an addon for you.

Annika 10-17-14 02:20 PM

OMG it works! Thank you SO much, that was driving me mad! Really appreciate it! :D

SDPhantom 10-17-14 04:48 PM

Quote:

Originally Posted by semlar (Post 298213)
Lua Code:
  1. SetSuperTrackedQuestID(0)
  2. hooksecurefunc('SetSuperTrackedQuestID', function(questID) if questID ~= 0 then SetSuperTrackedQuestID(0) end end)

Hooking a function then unwittingly calling it from itself is dangerously close to sending Lua into an infinite loop by recursive calling. You can avoid this by storing the old function and calling that directly instead of calling it normally and running your hook again.
Lua Code:
  1. local oldfunc=SetSuperTrackedQuestID;
  2. hooksecurefunc('SetSuperTrackedQuestID', function() oldfunc(0); end);

Note hooksecurefunc() creates a new function just like any manual hooking method would. The only difference is it bypasses the taint mechanic.

semlar 10-17-14 05:04 PM

It's not an infinite loop because it stops when you pass 0 to the function.

SDPhantom 10-17-14 05:24 PM

Hence the phrasing dangerously close. I know your code checks and counters for it. I'm just offering an alternative that wouldn't run the risk of recursive calling.

Annika 08-21-16 12:12 PM

So, after two years of blessed arrow-free gameplay, it's BACK and the addon that Semlar so kindly wrote all that time ago is not doing anything for it this time. Is there anything that can be done about it in a post-Legion Azeroth?

Any assistance much appreciated!

Phanx 08-21-16 08:45 PM

Check the "Load out of date addons" option on the addon manager screen. Nothing about the functions used in Semlar's code has changed in the patch, so the addon should still work just fine, but the game automatically disables "out of date" addons for major patches.

Once you've verified that it works, open the .toc file in the addon's folder and change the number after "## Interface:" to "70000". This will tell the game that it's no longer "out of date".

jeffy162 08-22-16 06:29 AM

Why not just get the Hide Quest Arrow addon? True, it's on Curse.com instead of WoWInterface.com, and it's out-of-date, but, it still works just fine.

Phanx 08-22-16 08:53 AM

The code in that addon is identical to what's posted in this thread.

Annika 09-10-16 04:53 AM

Sorry it took me such a long time to come back, work got heavy and I didn't have a chance to try it out today. It works, yay! Thank you both so much for taking the time to help, really, really appreciate it!

Annika 05-06-17 12:10 PM

Resurrecting this thread because Blizzard has found a new and exciting way to screw with me: The add-on very helpfully posted in this thread (thank you again!) still works, but now has the unfortunate side effect of not making it impossible to read quest text in the quest log, which makes thing a little awkward.

Anyone have any idea if it is fixable, please? (Pretty, pretty please and thank you!)

stianhoiland 11-09-17 04:41 AM

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 :)

Kanegasi 11-09-17 07:09 AM

Quote:

Originally Posted by stianhoiland (Post 325758)
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.

It is not good practice to replace Blizzard functions. Even if it's a minor function called from only one place, it's a good way to cause a taint, no matter what your replacement does.

The simplest way to fix the code in this thread is to use an ID of a quest that doesn't exist instead of 0. According to wowhead, 3 is the next number that brings up nothing.

Linorox 01-30-18 11:05 PM

Dropping the arrow without messing with Blizz functions
 
Quote:

Originally Posted by Kanegasi (Post 325761)
It is not good practice to replace Blizzard functions. Even if it's a minor function called from only one place, it's a good way to cause a taint, no matter what your replacement does.

The simplest way to fix the code in this thread is to use an ID of a quest that doesn't exist instead of 0. According to wowhead, 3 is the next number that brings up nothing.

Quote:

Originally Posted by semlar (Post 298213)
It's built into the minimap. Your only option, aside from physically replacing the arrow texture (which I don't think even works), is to un-track the quest it's pointing to.

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

I don't understand about programming, but I really want to drop the arrow without messing with blizz functions. So, which quest ID number should be replaced by 3? Is it in the code above? How should the code look like after fixed? If someone could provide the right code, it could be transformed into a addon and solve the problem =D Thanks!

Annika 07-29-18 03:47 AM

Quote:

Originally Posted by Linorox (Post 326704)
I don't understand about programming, but I really want to drop the arrow without messing with blizz functions. So, which quest ID number should be replaced by 3? Is it in the code above? How should the code look like after fixed? If someone could provide the right code, it could be transformed into a addon and solve the problem =D Thanks!

As of November, that code works to hide the arrow but simultaneously prevents interaction with the quest log, so not ideal.


@stianhoiland: I'm so sorry it took so long for me to thank you for your efforts on this one, unfortunately I was not able to get online much at that time and never got a chance to try it out (life stuff), but I really appreciate the efforts you went to for me and others.

If anyone feels like a challenge, the arrow is now back and refusing to leave without taking the quest log with it. Any support much appreciated, as always! (Side note: I can't believe this thread is 4 years old. What a long, strange ride it's been, and still Blizzard hate me and insist on forcing that stupid arrow into my life, why?!)

ryoriot 04-05-19 08:51 PM

Quote:

Originally Posted by Annika (Post 329140)
If anyone feels like a challenge, the arrow is now back and refusing to leave without taking the quest log with it. Any support much appreciated, as always! (Side note: I can't believe this thread is 4 years old. What a long, strange ride it's been, and still Blizzard hate me and insist on forcing that stupid arrow into my life, why?!)

I haven't solved your problem exactly. But I have a solution that might be good enough:

First I installed this mod: Classic Quest Log

Then I made this macro:
Code:

/run hooksecurefunc('SetSuperTrackedQuestID',function(questID) if questID ~= 0 then SetSuperTrackedQuestID(0); end end);
/run SetSuperTrackedQuestID(0);

That's a single line for each /run.

Now, I'm hiding the quest-log that follows the map. And I'm using the Classic Quest Log instead. This quest log will not be hijacked by the script running from the macro. I run this once per session (or after a /reload – that command will remove the effect of the macroed script aswell).

Alternatively you could create a map and quest log-addon from the default blizzard map and quest-log, and simply remove any checks to SuperTrackedQuestID to get rid of the hijacking, but I haven't bothered doing that.


All times are GMT -6. The time now is 02:47 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI