WoW:API GetMapZones: Difference between revisions
Jump to navigation
Jump to search
GetMapZones -Documentation by Meog-
No edit summary |
m (Recategorization) |
||
Line 1: | Line 1: | ||
<center>'''GetMapZones''' ''-Documentation by [[user:Meog|Meog]]-''</center> | <center>'''GetMapZones''' ''-Documentation by [[user:Meog|Meog]]-''</center> | ||
Returns the zone names of | Returns the zone names of a continent | ||
GetMapZones( | zone_1, zone_2, ..., zone_N = GetMapZones(continentIndex); | ||
---- | ---- | ||
;''Arguments'' | ;''Arguments'' | ||
: | :(continentIndex) | ||
:;continent | :;continentIndex : Number - Which continent to fetch the zone list from (continent indexes refer to the result of [[API GetMapContinents|GetMapContinents()]]). Currently the values are 1 for Kalimdor, and 2 for Eastern Kingdoms. | ||
---- | ---- | ||
;''Returns'' | ;''Returns'' | ||
: | :zone_1, zone_2, ..., zone_N | ||
:; | :;zone_<i>i</i> : String - The name of the <i>i</i>'th zone within the continent (<i>i</i> corresponds to the value [[API_GetCurrentMapZone|GetCurrentMapZone()]] returns) | ||
---- | ---- | ||
Line 28: | Line 28: | ||
LoadZones(GetMapZones(2)); -- Eastern Kingdoms | LoadZones(GetMapZones(2)); -- Eastern Kingdoms | ||
Note that this is equivalent to | |||
ZoneNames = { GetMapZones(2) } ; | |||
;''Result'' | ;''Result'' | ||
Line 37: | Line 41: | ||
---- | ---- | ||
;'' | ;''Details'' | ||
: 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. | |||
---- | ---- | ||
{{Template:WoW API}} | {{Template:WoW API}} | ||
[[Category:API World Map Functions|GetMapZones]] |
Revision as of 19:19, 28 December 2004
Returns the zone names of a continent
zone_1, zone_2, ..., zone_N = GetMapZones(continentIndex);
- Arguments
- (continentIndex)
- continentIndex
- Number - Which continent to fetch the zone list from (continent indexes refer to the result of GetMapContinents()). Currently the values are 1 for Kalimdor, and 2 for Eastern Kingdoms.
- Returns
- zone_1, zone_2, ..., zone_N
- zone_i
- String - The name of the i'th zone within the continent (i corresponds to the value GetCurrentMapZone() returns)
- Example
ZoneNames = {}; function LoadZones(...) for i=1, arg.n, 1 do ZoneNames[i] = arg[i]; end end LoadZones(GetMapZones(2)); -- Eastern Kingdoms
Note that this is equivalent to
ZoneNames = { GetMapZones(2) } ;
- Result
The array ZoneNames holds all available zone names of the Eastern Kingdoms: ZoneNames[1] == "Alterac Mountains" ZoneNames[2] == "Arathi Highlands" ... ZoneNames[25] == "Wetlands"
- Details
- 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.