World Map Icon Addon Update
Hello everyone,
In the past I enlisted the help of this forum to make a custom addon that would hide flight path icons (and a few others I've added) from the world map. An awesome member named Phanx wrote it up for me free of charge, and I've used it ever since! I recently returned from a WoW hiatus and it seems to have broken somehow. I'm no addon coder by any means; could you help me update it again so it'll keep functioning? :) I have an addon that does the main task of hiding the icons, and I also have a macro that scans the world map I'm in for landmark POI numbers. The problem I'm having now is that the icons aren't being hidden, and the macro returns a list of nil. This is what the addon looks like currently: Code:
hooksecurefunc("WorldMapFrame_Update", function() Code:
/run for i = 1, GetNumMapLandmarks() do local _, name, _, textureIndex = GetMapLandmarkInfo(i) print(i, textureIndex, name) end For reference, the initial thread request: http://www.wowinterface.com/forums/s...ad.php?t=44204 And once last year, when it needed updating: http://www.wowinterface.com/forums/s...ad.php?t=54004 Any ideas what I'd need to fix? |
After making a copy, try changing:
Code:
local _, name, _, textureIndex = GetMapLandmarkInfo(i) Code:
local landmarkType, name = C_WorldMap.GetMapLandmarkInfo(i) The macro becomes Code:
/run for i = 1, GetNumMapLandmarks() do local landmarkType, name = C_WorldMap.GetMapLandmarkInfo(i) print(i, landmarkType, name) end These are the landmarkType used in the WorldMapFrame (there may be more) LE_MAP_LANDMARK_TYPE_TAMER = 1 LE_MAP_LANDMARK_TYPE_GOSSIP = 3 LE_MAP_LANDMARK_TYPE_TAXINODE = 5 LE_MAP_LANDMARK_TYPE_VIGNETTE = 6 LE_MAP_LANDMARK_TYPE_INVASION = 8 LE_MAP_LANDMARK_TYPE_DUNGEON_ENTRANCE = 9 LE_MAP_LANDMARK_TYPE_CONTRIBUTION = 10 LE_MAP_LANDMARK_TYPE_MAP_LINK = 11 |
That did it! Thank you, Fizzlemizz! :D Seems I don't need a separate entry for neutral, horde and alliance flight points anymore.
This forum has been incredibly helpful, I can't thank you enough. <3 |
All times are GMT -6. The time now is 12:56 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI