View Single Post
07/27/15, 11:02 PM   #24
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by Ayantir View Post
Thank you,

It's
Lua Code:
  1. SetMapToPlayerLocation()
which update the whole thing,

You'll need to after:

Lua Code:
  1. CALLBACK_MANAGER:FireCallbacks("OnWorldMapChanged")

to do not break other addons (and map) aswell.

and then the functions works well.
Well, I wouldn't recommend doing this too often if you have many custom pins, the callback will force all add-ons to refresh pins on the map and if you also use minimap - there as well.
The wrong zone ids are for some quest areas, the best way to determine where you are so far is by getting current map texture. Of cource its not as reliable as if there would be an API function to tell us which mapId is our player at.