Quantcast
World Map Icon Addon Update #2 - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-13-18, 02:04 AM   #1
Thon
A Deviate Faerie Dragon
Join Date: Sep 2012
Posts: 12
World Map Icon Addon Update #2

Hello all!

I've popped in from time to time to get some help with a custom addon you guys wrote for me a couple years ago. The function is mainly to hide flight path icons on the world map (not the flight map), though it tends to catch a few other icons too, such as cities/towns, PvP vendors, even Sentinax and similar things. Unfortunately since 8.0 it doesn't work anymore, not even the macro I have for identifying Map POIs.

I'm certainly no addon developer (though I really should learn the basics at this stage so I don't have to keep pestering you all), but you guys have been such tremendous help to me in the past. If you have the time, mind helping an old fan out to update his addon for the expansion launch?

This is the current code:
Code:
hooksecurefunc("WorldMapFrame_Update", function()
    for i = 1, GetNumMapLandmarks() do
        local landmarkType, name = C_WorldMap.GetMapLandmarkInfo(i)
        if landmarkType == 0 or landmarkType == 5 or landmarkType == 6 or landmarkType == 9 or landmarkType == 46 or landmarkType == 48 or landmarkType == 178 or landmarkType == 179 or landmarkType == 180 or landmarkType == 188 or landmarkType == 194 
then
            local poi = _G["WorldMapFramePOI"..i]
            if poi then
                -- The "if poi then" check is probably not needed, but better safe than sorry!
                poi:Hide()
            end
        end
    end
end)

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)
And here's the macro to scan the map for POIs:
Code:
/run for i = 1, GetNumMapLandmarks() do local _, name, _, textureIndex = GetMapLandmarkInfo(i) print(i, textureIndex, name) end
Sometimes I've been able to change the POIs to fix it on my own, but this time nothing works. The macro doesn't return anything. From what I can tell, the only icon change to the maps are the added zeppelin/boat world travel markers, but there must be some underlying syntax change that's beyond my capabilities. Any ideas?
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » World Map Icon Addon Update #2

Thread Tools
Display Modes

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