m
Move page script moved page API GetMapZones to WoW:API GetMapZones without leaving a redirect
({{wowapi}}) |
m (Move page script moved page API GetMapZones to WoW:API GetMapZones without leaving a redirect) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 8: | Line 8: | ||
:(continentIndex) | :(continentIndex) | ||
:;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, | :;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, 2 for Eastern Kingdoms, and 3 is for Outlands (without Twisting Nether). | ||
---- | ---- | ||
| Line 14: | Line 14: | ||
:zone_1, zone_2, ..., zone_N | :zone_1, zone_2, ..., zone_N | ||
:;zone_ | :;zone_''i'' : String - The name of the ''i'''th zone within the continent (''i'' corresponds to the value [[API_GetCurrentMapZone|GetCurrentMapZone()]] returns) | ||
---- | ---- | ||
;''Example'' | ;''Example 1'' | ||
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)) | |||
;''Result'' | |||
The array C1 holds all a list of all zone names for Kalimdore, C2 for Eastern Kingdoms, C3 for Outland, and C4 for Northrend. | |||
---- | |||
;''Example 2'' | |||
ZoneNames = {}; | ZoneNames = {}; | ||