WoW:API GetRealZoneText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Put back category)
m (Move page script moved page API GetRealZoneText to API GetRealZoneText without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''GetRealZoneText'''</center>
{{wowapi}} __NOTOC__


  ZoneName = GetRealZoneText();
  ZoneName = GetRealZoneText();


Returns the real name of the Zone, e.g. Loch Modan or Elwynn Forest.
When in an instance, returns the real name of the instance, not the name in the Minimap. (e.g. returns "The Stockade" whereas GetZoneText() returns "Stormwind Stockade"). Otherwise is identical to [[API_GetZoneText|GetZoneText]].


----
As of 4.? something this is no longer accurate. These appear to return the same thing. For example: GetInstanceInfo, GetRealZoneText, GetZoneText all return "Stormwind Stockade", however [[API GetMapNameByID|GetMapNameByID(]][[API GetCurrentMapAreaID|GetCurrentMapAreaID())]] now returns "The Stockade". As of 5.3, GetRealZoneText/GetZoneText do *not* always match GetMapNameByID or GetInstanceInfo.
;''Arguments''
 
==Parameters==
===Arguments===


:none
:none


----
===Returns===
;''Returns''
:;ZoneName : String - The real name of an instance or the zone name
 
:;ZoneName : String - Returns the real name of the Zone, e.g. Loch Modan or Elwynn Forest.
 
----
;''Example''
 
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
  ZoneName = GetRealZoneName();
  message("Zone:"..ZoneName);


;''Result''
==Example==


:An error popup appears that could show the following text: "Zone: Loch Modan"
  local zoneName = GetRealZoneText();
  message("Zone: "..zoneName);


----
:An error popup appears that could show the following text: "Zone: Stormwind Stockade"
{{Template:WoW API}}
[[Category:API Location Functions|GetRealZoneText]]

Latest revision as of 04:46, 15 August 2023

WoW API < GetRealZoneText

ZoneName = GetRealZoneText();

When in an instance, returns the real name of the instance, not the name in the Minimap. (e.g. returns "The Stockade" whereas GetZoneText() returns "Stormwind Stockade"). Otherwise is identical to GetZoneText.

As of 4.? something this is no longer accurate. These appear to return the same thing. For example: GetInstanceInfo, GetRealZoneText, GetZoneText all return "Stormwind Stockade", however GetMapNameByID(GetCurrentMapAreaID()) now returns "The Stockade". As of 5.3, GetRealZoneText/GetZoneText do *not* always match GetMapNameByID or GetInstanceInfo.

Parameters[edit]

Arguments[edit]

none

Returns[edit]

ZoneName
String - The real name of an instance or the zone name

Example[edit]

 local zoneName = GetRealZoneText();
 message("Zone: "..zoneName);
An error popup appears that could show the following text: "Zone: Stormwind Stockade"