Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-24-17, 01:44 PM   #1
Thon
A Deviate Faerie Dragon
Join Date: Sep 2012
Posts: 12
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()
    for i = 1, GetNumMapLandmarks() do
        local _, name, _, textureIndex = GetMapLandmarkInfo(i)
        if textureIndex == 0 or textureIndex == 5 or textureIndex == 6 or textureIndex == 46 or textureIndex == 48 or textureIndex == 178 or textureIndex == 179 or textureIndex == 180 or textureIndex == 188 or textureIndex == 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)
And the macro is as follows:
Code:
/run for i = 1, GetNumMapLandmarks() do local _, name, _, textureIndex = GetMapLandmarkInfo(i) print(i, textureIndex, name) end
I'm guessing the POI or map system got changed in some way.
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?
  Reply With Quote
 

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


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