Thread Tools Display Modes
07-24-16, 04:53 AM   #1
Thon
A Deviate Faerie Dragon
Join Date: Sep 2012
Posts: 12
Question World Map Icon Addon Request!

Hello guys

I was here a couple of years ago requesting an addon to hide certain icons from the world map. In particular, the flight path icon, because it would show up on a map before I've discovered the area. Too spoileriffic to how I want to explore, and I'm kind of a map purist anyway. :P I like the hand-drawn style of the fantasy maps and I want to keep them uncluttered!

You guys were a huge help; I have no experience with addon coding at all and you made one that solved my exact problem! I even got a macro to find the IDs for future icons I want to hide. (Thanks again, Phanx!) All was well.

I'll refer you to the previous thread for reference: http://www.wowinterface.com/forums/s...ad.php?t=44204

Unfortunately now with 7.0 the addon doesn't seem to work any longer. All the original icons I hid are back (Horde/Alliance/Neutral flight paths, city icon, town icon, honor/conquest vendors etc), and they seem to have added giant buttons for bosses too, which used to be toggleable in the default UI. They must have outright changed the functionality of the icons, because the macro to reveal POIs now turns up a list of nil.

Is it still possible to do the same thing it used to? And if so, can any of you help me out with a new code and macro?
  Reply With Quote
07-24-16, 04:18 PM   #2
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
Originally Posted by Thon View Post
Hello guys

I was here a couple of years ago requesting an addon to hide certain icons from the world map. In particular, the flight path icon, because it would show up on a map before I've discovered the area. Too spoileriffic to how I want to explore, and I'm kind of a map purist anyway. :P I like the hand-drawn style of the fantasy maps and I want to keep them uncluttered!

You guys were a huge help; I have no experience with addon coding at all and you made one that solved my exact problem! I even got a macro to find the IDs for future icons I want to hide. (Thanks again, Phanx!) All was well.

I'll refer you to the previous thread for reference: http://www.wowinterface.com/forums/s...ad.php?t=44204

Unfortunately now with 7.0 the addon doesn't seem to work any longer. All the original icons I hid are back (Horde/Alliance/Neutral flight paths, city icon, town icon, honor/conquest vendors etc), and they seem to have added giant buttons for bosses too, which used to be toggleable in the default UI. They must have outright changed the functionality of the icons, because the macro to reveal POIs now turns up a list of nil.

Is it still possible to do the same thing it used to? And if so, can any of you help me out with a new code and macro?
In Phanx's original code all you need to do is offset the values you are examining from the call to GetMapLandmarkInfo() by one. It seems Blizzard added a new return value. So just change the line to:
Code:
        local _, name, _, textureIndex = GetMapLandmarkInfo(i)
  Reply With Quote
07-25-16, 02:50 PM   #3
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Nimhfree View Post
In Phanx's original code all you need to do is offset the values you are examining from the call to GetMapLandmarkInfo() by one. It seems Blizzard added a new return value. So just change the line to:
Code:
        local _, name, _, textureIndex = GetMapLandmarkInfo(i)
The new return value is landmarkType, which you actually would want to use directly. Here are the possible (known) values:

Code:
LE_MAP_LANDMARK_TYPE_NORMAL
LE_MAP_LANDMARK_TYPE_TAMER
LE_MAP_LANDMARK_TYPE_GOSSIP
LE_MAP_LANDMARK_TYPE_TAXINODE
LE_MAP_LANDMARK_TYPE_VIGNETTE
LE_MAP_LANDMARK_TYPE_INVASION
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
07-25-16, 05:50 PM   #4
Thon
A Deviate Faerie Dragon
Join Date: Sep 2012
Posts: 12
Originally Posted by Nimhfree View Post
In Phanx's original code all you need to do is offset the values you are examining from the call to GetMapLandmarkInfo() by one. It seems Blizzard added a new return value. So just change the line to:
Code:
        local _, name, _, textureIndex = GetMapLandmarkInfo(i)
Yes!! Thank you, that did it! I'm glad it was a relatively easy solution.

While I'm at it, I want to take this a step further and see if I can hide the newer icons, such as the Bonus Objective icon, the new 'Quest Available' icon (there is an older POI version, too, and that I can hide), or the Boss icon (which leads to the dungeon journal if clicked). I had a look at http://wow.gamepedia.com/API_GetMapLandmarkInfo and I believe these count as Object icons rather than POI icons.

Examples of these:

Bonus Objectives and Quest Available: http://i.imgur.com/vKKVavd.jpg

Boss Icon (was taken before hiding the lesser icons): http://i.imgur.com/ybHp47o.jpg

The object icons don't show up in the getlandmarks macro either. Are these possible to hide at all?
  Reply With Quote
07-26-16, 07:59 AM   #5
Nimhfree
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 267
To get rid of the bonus objectives you can use the following code:
Code:
hooksecurefunc("WorldMap_UpdateQuestBonusObjectives", function()
	local mapAreaID = GetCurrentMapAreaID()
	local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(mapAreaID)
	local numTaskPOIs = 0;
	if(taskInfo ~= nil) then
		numTaskPOIs = #taskInfo;
	end
	local taskIconCount = 1;
	if ( numTaskPOIs > 0 ) then
		for _, info  in next, taskInfo do
			local taskPOIName = "WorldMapFrameTaskPOI"..taskIconCount;
			local taskPOI = _G[taskPOIName];
			taskPOI:Hide();
			taskIconCount = taskIconCount + 1;
		end
	end
end)
To get rid of the encounter journal bosses you can set the CVar in your Config.wtf file like:

SET showBosses "1"
  Reply With Quote
07-27-16, 12:51 PM   #6
Thon
A Deviate Faerie Dragon
Join Date: Sep 2012
Posts: 12
Originally Posted by Nimhfree View Post
To get rid of the bonus objectives you can use the following code:
Code:
hooksecurefunc("WorldMap_UpdateQuestBonusObjectives", function()
	local mapAreaID = GetCurrentMapAreaID()
	local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID(mapAreaID)
	local numTaskPOIs = 0;
	if(taskInfo ~= nil) then
		numTaskPOIs = #taskInfo;
	end
	local taskIconCount = 1;
	if ( numTaskPOIs > 0 ) then
		for _, info  in next, taskInfo do
			local taskPOIName = "WorldMapFrameTaskPOI"..taskIconCount;
			local taskPOI = _G[taskPOIName];
			taskPOI:Hide();
			taskIconCount = taskIconCount + 1;
		end
	end
end)
To get rid of the encounter journal bosses you can set the CVar in your Config.wtf file like:

SET showBosses "1"
Yes! Bonus Objectives are gone! Was there a similar fix for the quest icons? (You can see them in the top left on the first screenshot) Also, should I combine the two codes or is it okay to simply place the Bonus Objectives section after the first section?

As for boss icons, I did some testing and I believe 0 is the setting to hide them. However, it seems to automatically become enabled upon entering a dungeon. I could even see the icons for world bosses on outside maps, when I was in a dungeon. When I was outside the dungeon, they were hidden as intended.

Even when logging out from a dungeon, the CVar still has a 0. So either it resets it to 0 upon logout, or dungeons have a different workaround while you're in them.


Edit: Upon further tries it doesn't seem to be bound by CVar 0 or 1. On both settings I've had the icons come and go, so there must be other factors in play.

Last edited by Thon : 07-30-16 at 04:54 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » World Map Icon Addon Request!


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off