Thread Tools Display Modes
03-15-23, 08:56 AM   #1
lol_i_need_ur_help
A Murloc Raider
Join Date: Jul 2020
Posts: 7
Question Zone id -> to zone name.

Hi, as in title, how that thing can be done?

For example i had zone id 7541 which is Stormheim, so how do i convert id to name?

I was tried GetRealZoneText(**id**) but it returns nothing.
  Reply With Quote
03-15-23, 09:31 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
If you're dealing with mapID: https://wowpedia.fandom.com/wiki/API_C_Map.GetMapInfo

7541 seems to be an areaID, try this: https://wowpedia.fandom.com/wiki/API_C_Map.GetAreaInfo
  Reply With Quote
03-16-23, 06:04 PM   #3
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Try this
Lua Code:
  1. mapID = C_Map.GetBestMapForUnit("player")
  2. mapName= C_Map.GetMapInfo(mapID).name
  3. print("MapID", mapID, "Map Zone", mapName)
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
03-17-23, 03:09 AM   #4
lol_i_need_ur_help
A Murloc Raider
Join Date: Jul 2020
Posts: 7
Red face

^^^^


Thanks guys.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Zone id -> to zone name.


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