View Single Post
07/27/15, 07:44 PM   #23
XanDDemoX
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 28
Originally Posted by circonian View Post
Maybe I missunderstand what your wanting or trying to resolve (I didn't read all of the code), but if you mean the problem with the zoneIndex not matching where the player is for:
Lua Code:
  1. GetCurrentMapZoneIndex()
When the users map has a different map loaded AND the user is in a city (or some poi) you can use:
Lua Code:
  1. GetCurrentSubZonePOIIndices()
  2.     Returns: integer:nilable zoneIndex, integer:nilable poiIndex
That is not dependent on the map, but only works in a POI.
The code is a solution for resolving the main zoneIndex even within a city or dungeon map etc without having to manipulate the world map. The player can be stood anywhere (excluding main quest and guild quest maps).

Thought it might be useful for somone

But thanks anyway, at the time, I didn't look to closely at that function as the name didn't sound like what I wanted