WoW API: GetCurrentMapZone

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetCurrentMapZone to API GetCurrentMapZone without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetCurrentMapZone

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.