WoW:API GetMapZones

Revision as of 12:41, 21 November 2004 by WoWWiki>Meog
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GetMapZones -Documentation by Meog-

Returns the zone names of one continent

GetMapZones(continent);

Arguments
Number continent
continent
number of the continent you want to get the zones. The numbers equal the values of API_GetCurrentMapContinent.
1: Kalimdor
2: Eastern Kingdoms

Returns
String zone_1, String zone_2, ..., String zone_n
zone_i
string, holds one zone name (i is equal to the value API_GetCurrentMapZone returns)

Example
ZoneNames = {};

function LoadZones(...)
   for i=1, arg.n, 1 do
      ZoneNames[i] = arg[i];
   end
end

LoadZones(GetMapZones(2)); -- Eastern Kingdoms
Result
The array ZoneNames holds all available zone names of the Eastern Kingdoms:
ZoneNames[1] == "Alterac Mountains"
ZoneNames[2] == "Arathi Highlands"
...
ZoneNames[25] == "Wetlands"

Description
Returns the zone names. There is a different number of zones on each continent.

Template:WoW API