View Single Post
01/19/18, 04:43 PM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,965
Did you put this code into event_player_activated? If not the code was maybe not loaded properly and you need to logut and back in.

You could try to use functions like these here to get the zone info too:

Code:
* GetCurrentMapIndex()
** _Returns:_ *luaindex:nilable* _index_

* GetMapIndexByZoneId(*integer* _zoneId_)
** _Returns:_ *luaindex:nilable* _index_

* GetCyrodiilMapIndex()
** _Returns:_ *luaindex:nilable* _index_

* GetImperialCityMapIndex()
** _Returns:_ *luaindex:nilable* _index_

* GetCurrentMapZoneIndex()
** _Returns:_ *luaindex* _zoneIndex_

* GetZoneNameByIndex(*luaindex* _zoneIndex_)
** _Returns:_ *string* _zoneName_

* GetMapNameByIndex(*luaindex* _mapIndex_)
** _Returns:_ *string* _mapName_

* GetNumMaps()
** _Returns:_ *integer* _numMaps_

* MapZoomOut()
** _Returns:_ *[SetMapResultCode|#SetMapResultCode]* _setMapResult_

* WouldProcessMapClick(*number* _normalizedClickX_, *number* _normalizedClickY_)
** _Returns:_ *bool* _wouldProcess_, *luaindex:nilable* _resultingMapIndex_

* ProcessMapClick(*number* _normalizedClickX_, *number* _normalizedClickY_)
** _Returns:_ *[SetMapResultCode|#SetMapResultCode]* _setMapResult_

* GetMapInfo(*luaindex* _index_)
** _Returns:_ *string* _name_, *[UIMapType|#UIMapType]* _mapType_, *[MapContentType|#MapContentType]* _mapContentType_, *integer* _zoneId_, *string* _description_

* GetZoneDescription(*integer* _zoneIndex_)
** _Returns:_ *string* _description_

* GetZoneNameById(*integer* _zoneId_)
** _Returns:_ *string* _name_

* GetZoneDescriptionById(*integer* _zoneId_)
** _Returns:_ *string* _description_

* GetMapParentCategories(*luaindex* _index_)
** _Uses variable returns..._
** _Returns:_ *string* _categoryName_, *luaindex* _categoryIndex_

* GetMapNumTiles()
** _Returns:_ *integer* _numHorizontalTiles_, *integer* _numVerticalTiles_

* GetMapTileTexture(*luaindex* _tileIndex_)
** _Returns:_ *string* _tileFilename_

* GetMapName()
** _Returns:_ *string* _mapName_

* GetMapType()
** _Returns:_ *[UIMapType|#UIMapType]* _mapType_

* GetMapContentType()
** _Returns:_ *[MapContentType|#MapContentType]* _mapContentType_
Maybe the map texture names somehow use a pattern that say "We are in a house now". And you can read it from there in event_player_activated,
  Reply With Quote