WoW:API GetCurrentMapZone: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API GetCurrentMapZone to API GetCurrentMapZone without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<center>'''GetCurrentMapZone''' ''-Documentation by [[user:Meog|Meog]]-''</center>
{{wowapi}}
Returns the index of the zone the world map is currently showing


Returns the number of the zone the world map is currently showing
zoneIndex = GetCurrentMapZone();


GetCurrentMapZone();
== Returns ==
: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.


----
==Example==
;''Arguments''
  message(GetCurrentMapZone());
 
:''none''
 
----
;''Returns''
 
:Number zone
:;zone : 0, if showing one of the continent overviews<br>positive number, if showing a zone map. The zones are numbered alphabetically from 1 for each continent.
 
----
;''Example''
  local zone = GetCurrentMapZone();
   
   
 
===Result===
;''Result''
  10
  10


----
== Notes==
;''Description''
* 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.
 
* Note that zone IDs returned by this function are not the same across all localizations of World of Warcraft.
: Returns the number of the zone the world map is currently showing
 
----
{{Template:WoW API}}

Latest revision as of 04:45, 15 August 2023

WoW API < GetCurrentMapZone

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

zoneIndex = GetCurrentMapZone();

Returns[edit]

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[edit]

message(GetCurrentMapZone());

Result[edit]

10

Notes[edit]

  • 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.