WoW:API GetZoneText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Formatting, dismount is server-based)
Line 1: Line 1:
{{wowapi}}
{{wowapi}} __NOTOC__
Returns the zone text.
Returns the localized name of the zone the player is in.


  GetZoneText();
  zoneName = GetZoneText();


----
==Parameters==
;''Arguments''
===Returns===
:;zoneName : String - zone name (localized).


:''none''
==Example==
local zoneName = GetZoneText();
message(zoneName);


----
===Result===
;''Returns''
Message box appears displaying your current zone.


:
==Notes==
:;zonetext : String - zone name (localized).
The event '''ZONE_CHANGED_NEW_AREA''' is triggered when the text changes. See also the related functions [[API_GetSubZoneText|GetSubZoneText]] and [[API_GetMinimapZoneText|GetMinimapZoneText]].
 
----
;''Example''
local zonetext = GetZoneText();
message(zonetext);
 
;''Result''
: Message box appears displaying your current zone.
 
----
;''Description''
 
: Returns the zone text, in which the player currently is. The event '''ZONE_CHANGED_NEW_AREA''' is triggered when the text changes. See also the related functions [[API_GetSubZoneText|GetSubZoneText]] and [[API_GetMinimapZoneText|GetMinimapZoneText]].
: Additional note: Blizzard also registers the event '''ZONE_CHANGED_INDOORS'''. If you know what this event is used for, please edit this page.
 
: This is just a guess, but I imagine it dismounts you for one.  -- lCine7ic


Additional note: Blizzard also registers the event '''ZONE_CHANGED_INDOORS'''. If you know what this event is used for, please edit this page.
: The event ZONE_CHANGED_INDOORS would most likely be used if you were creating a minimap modification to notify you that you have gone into a building to change the minimap texture and the text above it to indicate the building you are in -- Salanex
: The event ZONE_CHANGED_INDOORS would most likely be used if you were creating a minimap modification to notify you that you have gone into a building to change the minimap texture and the text above it to indicate the building you are in -- Salanex

Revision as of 01:28, 28 December 2006

WoW API < GetZoneText

Returns the localized name of the zone the player is in.

zoneName = GetZoneText();

Parameters

Returns

zoneName
String - zone name (localized).

Example

local zoneName = GetZoneText();
message(zoneName);

Result

Message box appears displaying your current zone.

Notes

The event ZONE_CHANGED_NEW_AREA is triggered when the text changes. See also the related functions GetSubZoneText and GetMinimapZoneText.

Additional note: Blizzard also registers the event ZONE_CHANGED_INDOORS. If you know what this event is used for, please edit this page.

The event ZONE_CHANGED_INDOORS would most likely be used if you were creating a minimap modification to notify you that you have gone into a building to change the minimap texture and the text above it to indicate the building you are in -- Salanex