View Single Post
06-25-15, 10:58 AM   #1
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Map POI Tracking

I have create a small hook, to hide the stuck Draenor treasures from the world map:

Lua Code:
  1. hooksecurefunc("WorldMapFrame_Update", function(self)
  2.     for i = 1, GetNumMapLandmarks() do
  3.         local poi = _G["WorldMapFramePOI"..i]
  4.         local poiTexture = _G["WorldMapFramePOI"..i.."Texture"]
  5.         if poi and poiTexture then
  6.             local ULx, ULy, LLx, LLy, URx, URy, LRx, LRy = poiTexture:GetTexCoord()
  7.             if ULx == 0.07421875 and ULy == 0.494140625 and LLx == 0.07421875 and LLy == 0.52734375 and URx == 0.140625 and URy == 0.494140625 and LRx == 0.140625 and LRy == 0.52734375 then
  8.                 poi:Hide()
  9.             end
  10.         end
  11.     end
  12. end)

Is it possible to add this function to the World Map Frame's Tracking dropdown as "Show Trasures" as a toggle?
  Reply With Quote