Originally Posted by Nimhfree
To get the current continent the player is in you can use the following:
Code:
local currentMapId, TOP_MOST = C_Map.GetBestMapForUnit('player'), true
local currentContinentInfo = MapUtil.GetMapParentInfo(currentMapId, Enum.UIMapType.Continent, TOP_MOST)
That info contains both the mapID and name.
|
Took me a few days but works like a charm
Thank you Nimhfree
Lua Code:
local currentMapId, TOP_MOST = C_Map.GetBestMapForUnit('player'), true
local currentContinentInfo = MapUtil.GetMapParentInfo(currentMapId, Enum.UIMapType.Continent, TOP_MOST)
zone.continent = currentContinentInfo.name