Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-31-22, 08:05 AM   #1
Firesong
A Deviate Faerie Dragon
Join Date: Jan 2022
Posts: 19
Question Getting ZoneId from GetMapInfo

Hello all,

I am new to WoW Lua and having issues with getting Zone Ids.

The documentation I am using is here: https://wowpedia.fandom.com/wiki/API...BestMapForUnit

This is the code in macro form:
/run local mapID = C_Map.GetBestMapForUnit("player"); print(format("You are in %s (%d)", C_Map.GetMapInfo(mapID).name, mapID))

When I do this in Northshire the output is "You are in Northshire (425)" but I want to get Elwynn Forest (34) and I can't.

Has the API changed in some way that means the wowhead zone ids are no longer correct?

All help appreciated.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Getting ZoneId from GetMapInfo


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