Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/01/16, 04:06 PM   #1
Terrillyn
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 24
[outdated] GetUnitSubZoneIndex() & GetSubZoneNameByIndex()

In looking for a way to get the characters current subzone (in order to determine if we are in a city or not) there doesn't seem to be a way to even get the subzone index the best I can do is create a table with all the city names in every language and do a pattern compare to GetPlayerLocationName() or string.match(GetPlayerLocationName(), "([%w%p]+)%s?") (but this doesn't work with other languages). There needs to be a way to identify the players subzone location particularly the subZoneIndex, the only other way atm is to use the map api, but this wont work properly if the player is using the map or if the map hasn't loaded.

I suggest two functions GetUnitSubZoneIndex() and GetSubZoneNameByIndex().
Code:
GetUnitSubZoneIndex(unitTag)
    returns number: subZoneIndex
GetSubZoneNameByIndex(subZoneIndex)
    returns string: subZoneName, string: subZoneMapName
 
 

ESOUI » Developer Discussions » Wish List » [outdated] GetUnitSubZoneIndex() & GetSubZoneNameByIndex()


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