WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Zone id -> to zone name. (https://www.wowinterface.com/forums/showthread.php?t=59531)

lol_i_need_ur_help 03-15-23 08:56 AM

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.

p3lim 03-15-23 09:31 AM

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

Walkerbo 03-16-23 06:04 PM

Try this
Lua Code:
  1. mapID = C_Map.GetBestMapForUnit("player")
  2. mapName= C_Map.GetMapInfo(mapID).name
  3. print("MapID", mapID, "Map Zone", mapName)

lol_i_need_ur_help 03-17-23 03:09 AM

^^^^


Thanks guys. :)


All times are GMT -6. The time now is 05:47 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI