Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
m ({{wowapi}})
Xporcbot (talk | contribs)
m (→‎top: clean up, replaced: {{removed → {{Removed)
Tag: WoW API docs
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
{{Removedapi|8.0.1}} __NOTOC__
{{wowapi}}
 
 
Returns the index of the zone the world map is currently showing
 
Returns the index of the zone the world map is currently showing
   
 
zoneIndex = GetCurrentMapZone();
 
zoneIndex = GetCurrentMapZone();
   
 
==Returns==
----
 
;''Arguments''
 
 
:''none''
 
 
----
 
;''Returns''
 
 
 
:zoneIndex
 
:zoneIndex
 
:;zoneIndex : Number - The index of the currently displayed zone within the continent (obtained via [[API GetMapZones|GetMapZones(continentIndex)]]), or 0 if showing the entire continent.
 
:;zoneIndex : Number - The index of the currently displayed zone within the continent (obtained via [[API GetMapZones|GetMapZones(continentIndex)]]), or 0 if showing the entire continent.
   
 
==Example==
----
 
 
message(GetCurrentMapZone());
;''Example''
 
 
local zone = GetCurrentMapZone();
 
 
 
;''Result''
+
===Result===
 
10
 
10
   
  +
== Notes==
----
 
 
* Note that the value returned represents the map display, and not necessarily the player's actual location. The [[API SetMapToCurrentZone|SetMapToCurrentZone()]] function will reset the values to represent the player's location.
;''Details''
 
  +
* Note that zone IDs returned by this function are not the same across all localizations of World of Warcraft.
 
:Note that the value returned represents the map display, and not necessarily the player's actual location. The [[API SetMapToCurrentZone|SetMapToCurrentZone()]] function will reset the values to represent the player's location.
 

Latest revision as of 18:12, 4 April 2020

Returns the index of the zone the world map is currently showing

zoneIndex = GetCurrentMapZone();

Returns

zoneIndex
zoneIndex
Number - The index of the currently displayed zone within the continent (obtained via GetMapZones(continentIndex)), or 0 if showing the entire continent.

Example

message(GetCurrentMapZone());

Result

10

Notes

  • Note that the value returned represents the map display, and not necessarily the player's actual location. The SetMapToCurrentZone() function will reset the values to represent the player's location.
  • Note that zone IDs returned by this function are not the same across all localizations of World of Warcraft.