WoW:Events/Map: Difference between revisions
m (This revision and previous are available under: CC BY-SA 3.0. See list of authors in previous history below.) |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC____NOEDITSECTION__{{eventlistheader}} | __NOTOC____NOEDITSECTION__{{eventlistheader}} | ||
:{{icon-information}}Note that this page is automatically generated; editing it is pointless. To edit event descriptions, edit the entries in the alphabetical pages, e.g. [[Events/A]], [[Events/B]], etc. Changes there will be copied over to here within a few hours. | :{{icon-information}}Note that this page is automatically generated; editing it is pointless. To edit event descriptions, edit the entries in the alphabetical pages, e.g. [[Events/A]], [[Events/B]], etc. Changes there will be copied over to here within a few hours. | ||
== Map related events == | == Map related events == | ||
{{evt|CLOSE_WORLD_MAP|Map}} | {{evt|CLOSE_WORLD_MAP|Map}} | ||
Supposed to fire whenever the world map is closed/hidden, though it doesn't. A workaround for this is to use "WORLD_MAP_UPDATE" to set a global variable to use elsewhere with an OnUpdate function; e.g. | Supposed to fire whenever the world map is closed/hidden, though it doesn't. A workaround for this is to use "WORLD_MAP_UPDATE" to set a global variable to use elsewhere with an OnUpdate function; e.g. | ||
<pre> | |||
local Map_Changed = false; | local Map_Changed = false; | ||
Line 28: | Line 21: | ||
end | end | ||
end | end | ||
</pre> | |||
When the second function is called, it checks to see if the map has been opened/closed (Map_Changed), then checks to see if the map is currently open (WorldMapFrame). | When the second function is called, it checks to see if the map has been opened/closed (Map_Changed), then checks to see if the map is currently open (WorldMapFrame). | ||
<br>The effect is a code that executes only when the map closes. | <br>The effect is a code that executes only when the map closes. | ||
{{evt|MINIMAP_PING|Map}} | {{evt|MINIMAP_PING|Map}} | ||
Line 40: | Line 32: | ||
; arg2 : x | ; arg2 : x | ||
; arg3 : y | ; arg3 : y | ||
{{evt|MINIMAP_UPDATE_ZOOM|Map}} | {{evt|MINIMAP_UPDATE_ZOOM|Map}} | ||
Line 47: | Line 38: | ||
This event does not relate to the '''+''' and '''-''' minimap zoom buttons. | This event does not relate to the '''+''' and '''-''' minimap zoom buttons. | ||
{{evt|MINIMAP_UPDATE_TRACKING|Map}} | {{evt|MINIMAP_UPDATE_TRACKING|Map}} | ||
Line 54: | Line 44: | ||
; arg1 : Mouse button used to click the tracking button (i.e. "LEFTBUTTON") | ; arg1 : Mouse button used to click the tracking button (i.e. "LEFTBUTTON") | ||
{{evt|WORLD_MAP_NAME_UPDATE|Map}} | {{evt|WORLD_MAP_NAME_UPDATE|Map}} | ||
{{evt|WORLD_MAP_UPDATE|Map}} | {{evt|WORLD_MAP_UPDATE|Map}} | ||
Line 66: | Line 52: | ||
When entering a battleground, this event won't fire until the zone is changed (i.e. in WSG when you walk outside of Warsong Lumber Mill or Silverwing Hold --[[User:Salanex|Salanex]] | When entering a battleground, this event won't fire until the zone is changed (i.e. in WSG when you walk outside of Warsong Lumber Mill or Silverwing Hold --[[User:Salanex|Salanex]] | ||
{{evt|ZONE_CHANGED|Map}} | {{evt|ZONE_CHANGED|Map}} | ||
Fired when the player enters a new zone. Zones are the smallest named subdivions of the game world and are contained within areas (also called regions). Whenever the text over the minimap changes, this event is fired. | Fired when the player enters a new zone. Zones are the smallest named subdivions of the game world and are contained within areas (also called regions). Whenever the text over the minimap changes, this event is fired. | ||
{{evt|ZONE_CHANGED_INDOORS|Map}} | {{evt|ZONE_CHANGED_INDOORS|Map}} | ||
Fired when a player enters a new zone within a city. | Fired when a player enters a new zone within a city. | ||
{{evt|ZONE_CHANGED_NEW_AREA|Map}} | {{evt|ZONE_CHANGED_NEW_AREA|Map}} |
Latest revision as of 07:16, 15 August 2023
|
|
"CLOSE_WORLD_MAP"
|
Category: Map |
Supposed to fire whenever the world map is closed/hidden, though it doesn't. A workaround for this is to use "WORLD_MAP_UPDATE" to set a global variable to use elsewhere with an OnUpdate function; e.g. local Map_Changed = false;
function MyAddon_OnEvent()
if ( (event == "WORLD_MAP_UPDATE") and WorldMapFrame:IsVisible() ) then
Map_Changed = true;
end
end
function MyAddon_OnUpdate()
if ( (Map_Changed) and not WorldMapFrame:IsVisible() ) then
''...do this...''
Map_Changed = false;
end
end
When the second function is called, it checks to see if the map has been opened/closed (Map_Changed), then checks to see if the map is currently open (WorldMapFrame).
|
"MINIMAP_PING"
|
Category: Map |
Fired when the minimap is pinged.
|
"MINIMAP_UPDATE_ZOOM"
|
Category: Map |
Fired when the minimap scaling factor is changed. This happens, generally, whenever the player moves indoors from outside, or vice versa. There are no arguments to this event. To test the player's location, compare the minimapZoom and minimapInsideZoom CVars with the current minimap zoom level (see GetZoom). This event does not relate to the + and - minimap zoom buttons. |
"MINIMAP_UPDATE_TRACKING"
|
Category: Map |
Added in 2.3, this event is fired when the player selects a different tracking type from the menu attached to the mini map. There seems to be no useful arguments as of the time of this writing.
|
"WORLD_MAP_NAME_UPDATE"
|
Category: Map |
"WORLD_MAP_UPDATE"
|
Category: Map |
Fired when the world map should be updated. When entering a battleground, this event won't fire until the zone is changed (i.e. in WSG when you walk outside of Warsong Lumber Mill or Silverwing Hold --Salanex |
"ZONE_CHANGED"
|
Category: Map |
Fired when the player enters a new zone. Zones are the smallest named subdivions of the game world and are contained within areas (also called regions). Whenever the text over the minimap changes, this event is fired. |
"ZONE_CHANGED_INDOORS"
|
Category: Map |
Fired when a player enters a new zone within a city. |
"ZONE_CHANGED_NEW_AREA"
|
Category: Map |
Fired when the user enters a new zone and a new area. e.g. moving from Duskwood to Stranglethorn Vale. In interface terms, this is anytime you get a new set of channels. The ZONE_CHANGED events are mutually exclusive! Note: When this event fires, the UI may still think you're in the zone you just left. Don't depend on GetRealZoneText() and similar functions to report the new zone in reaction to ZONE_CHANGED_NEW_AREA. (untested for similar events) |