View Single Post
04/11/14, 01:08 PM   #9
astray
Zam staff
Join Date: Feb 2014
Posts: 1
Originally Posted by Shinni View Post
This callback forces the map to be redrawn. The callback is normally called if the player is moving or he right clicks on the map etc.
I don't think esohead has to call this callback. I used SetMapToPlayerLocation() in my addons without the OnWorldMapChanged callback and everything works fine.
Let's say you're in Stonefalls, you open the map and right click back to the Tamriel world view and then close it from there. When your reticle passes over an object we want to track and we fire "SetMapToPlayerLocation" per the bug fix to prevent markers from being recorded on Tamriel in that situation, it will track the location just fine.

The problem is that the next time the player opens their map, there is ZO map code that thinks it needs to draw the map using the Tamriel map textures with Stonefalls data. It becomes very screwy, to say the least. In my testing the problem was resolved by firing the map callbacks to let ZO's map object know the map changed, but we later noticed it's a very expensive call. This was worked around when I found that "SetMapToPlayerLocation" returns 2 if a location is actually changed by the command and 1 if nothing needed to happen. So the callbacks are only fired when the player actually opens their map and changes it from the current map, then closes it.
  Reply With Quote