Lore archive · Warcraft Wiki, 2023 dump
API GetMapZones
Last wiki revision 2020-04-04
Returns the zone IDs and zone names of a specified continent.
zoneID_1, zoneName_1, zoneID_2, zoneName_2, ..., zoneID_N, zoneName_N = GetMapZones(continentIndex);
- continentIndex : Number - Which continent to fetch the zone list from (continent indexes refer to the result of GetMapContinents's string types, halved). Currently the values are 1 for Kalimdor, 2 for Eastern Kingdoms, and 3 is for Outland (without Twisting Nether).
- zoneID(n), zoneName(n) (where n is the zone index)
- zoneID_n : Number - The ID of the nth zone within the specified continent (n corresponds to the value GetCurrentMapZone returns)
- zoneName_n : String - The name of the nth zone within the specified continent (n corresponds to the value GetCurrentMapZone returns)
- There are a different number of zones on each continent and these may change without notice as new content is added. Use the name of a zone if you wish to make your code future-proof.
- Beware : zone names depend on locale, and zone number too because GetMapZones returns them in alphabetical order. So french and german clients do not have the zones returned in the same order than english ones, see the table of localized map zones.
local function LoadZones(c, ...) for i=1,select('#', ...),1 do c[i] = select(i,...) end end local C1 = {} local C2 = {} local C3 = {} local C4 = {} LoadZones(C1,GetMapZones(1)) LoadZones(C2,GetMapZones(2)) LoadZones(C3,GetMapZones(3)) LoadZones(C4,GetMapZones(4))
The array C1 holds all a list of all zone names for Kalimdor, C2 for Eastern Kingdoms, C3 for Outland, and C4 for Northrend.
Source
https://warcraft.wiki.gg/wiki/API_GetMapZones · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.