WoW:Events/C: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Weird |} removals)
m (Move page script moved page Events/C to Events/C without leaving a redirect)
 
(9 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<noinclude>__NOTOC__{{eventlistheader}}</noinclude>


|}
===== =====
{|
{{evt|CALENDAR_ACTION_PENDING|Calendar}}
Fired when the calendar API is busy or free
; arg1: busyFlag
{{evt|CALENDAR_CLOSE_EVENT|Calendar}}
{{evt|CALENDAR_EVENT_ALARM|Calendar}}
{{evt|CALENDAR_NEW_EVENT|Calendar}}
{{evt|CALENDAR_OPEN_EVENT|Calendar}}
Fired after calling CalendarOpenEvent once the event data has been retrieved from the server
{{evt|CALENDAR_UPDATE_INVITE_LIST|Calendar}}
Fired after CalendarEventSortInvites once the invite list has been sorted.
{{evt|CALENDAR_UPDATE_ERROR|Calendar}}
{{evt|CALENDAR_UPDATE_EVENT|Calendar}}
{{evt|CALENDAR_UPDATE_EVENT_LIST|Calendar}}
{{evt|CALENDAR_UPDATE_PENDING_INVITES|Calendar}}
{{evt|CANCEL_LOOT_ROLL|Loot}}
Fired when a player cancels a roll on an item
; arg1: rollID
{{evt|CANCEL_SUMMON|Player}}
{{evt|CHANNEL_COUNT_UPDATE|Misc}}
Fired when number of players in a channel changes '''but only if''' this channel is visible in ChannelFrame (it mustn't be hidden by a collapsed category header)
; arg1: channel id (item number in Blizzards ChannelFrame -> quod vide [[API GetChannelDisplayInfo]])
; arg2: number of players in channel
{{evt|CHANNEL_FLAGS_UPDATED|Misc}}
Fired when user changes selected channel in Blizzards ChannelFrame
; arg1: channel id (item number in Blizzards ChannelFrame -> quod vide [[API GetChannelDisplayInfo]])
{{evt|CHANNEL_INVITE_REQUEST|Communication}}
{{evt|CHANNEL_PASSWORD_REQUEST|Misc}}
Fired when user is asked for a password (normally after trying to join a channel without a password or with a wrong one)
; arg1: channel name
{{evt|CHANNEL_ROSTER_UPDATE|Misc}}
Fired when user changes selected channel in Blizzards ChannelFrame or number of players in currently selected channel changes
; arg1: channel id (item number in Blizzards ChannelFrame -> quod vide [[API GetChannelDisplayInfo]])
; arg2: number of players in channel
{{evt|CHANNEL_UI_UPDATE|Misc}}
Fired when Channel UI should change (e.g. joining / leaving a channel causes this event to fire)
{{evt|CHANNEL_VOICE_UPDATE|Misc}}
; arg1: unknown
; arg2: unknown
; arg3: unknown
{{evt|CHARACTER_POINTS_CHANGED|Player}}
Fired when the player's available talent points change
; arg1: indicates number of talent points changed:  -1 indicates one used (learning a talent), 1  indicates one gained (leveling)
{{evt|CHAT_MSG_ACHIEVEMENT|Communication,Guild,Achievements}}
Fired when a player in your vicinity completes an achievement.
; arg1: The full body of the broadcast message.
; arg2, arg5: The name of player who has just completed the achievement.
; arg7, arg8: Some integer.
{{evt|CHAT_MSG_ADDON|Communication}}
<Added in Patch '''1.12'''>
<br>Fired when the client receives a message from [[API SendAddonMessage|SendAddonMessage]]
<br>Since patch 4.1, you must register the addon prefix with [[API_RegisterAddonMessagePrefix|RegisterAddonMessagePrefix]] otherwise, events triggered by other players are blocked.
; arg1: prefix
; arg2: message
; arg3: distribution type ("PARTY", "RAID", "GUILD", "BATTLEGROUND" or "WHISPER")
; arg4: sender
{{evt|CHAT_MSG_AFK|Communication}}
Fired when the client receives an AFK auto-response
; arg1: AFK response message
; arg2: author
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_BATTLEGROUND|Communication,Battleground}}
<Added in Patch '''1.12'''>
<br>Fired when a message is received through the battleground group channel
; arg1: chat message
; arg2: author
; arg3: language
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_BATTLEGROUND_LEADER|Communication,Battleground}}
<Added in Patch '''1.12'''>
<br>Fired when a message is received from the leader of the battleground group
; arg1: chat message
; arg2: author
; arg3: language
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_BG_SYSTEM_ALLIANCE|Communication,Battleground}}
Fired for alliance specific events in the battleground such as assaulting a graveyard.
; arg1: Battleground Message  (eg. "The Alliance has taken the Blacksmith!")
{{evt|CHAT_MSG_BG_SYSTEM_HORDE|Communication,Battleground}}
Fired for horde specific events in the battleground such as assaulting a graveyard.
; arg1: Battleground Message  (eg. "The Horde has taken the Blacksmith!")
{{evt|CHAT_MSG_BG_SYSTEM_NEUTRAL|Communication,Battleground}}
Fired for non faction specific events in the battlegrounds such as the battle start announcement.
; arg1: Battleground Message  (eg. "Let the battle for Warsong Gulch begin.")
{{evt|CHAT_MSG_BN_CONVERSATION|Battle.net,Communication}}
{{evt|CHAT_MSG_BN_CONVERSATION_LIST|Battle.net,Communication}}
{{evt|CHAT_MSG_BN_CONVERSATION_NOTICE|Battle.net,Communication}}
{{evt|CHAT_MSG_BN_INLINE_TOAST_ALERT|Battle.net,Communication}}
{{evt|CHAT_MSG_BN_INLINE_TOAST_BROADCAST|Battle.net,Communication}}
{{evt|CHAT_MSG_BN_INLINE_TOAST_BROADCAST_INFORM|Battle.net,Communication}}
Fired when the Bnet Real ID Broadcast Message is changed or from [[API BNSetCustomMessage]]
; arg1: Broadcast Message
;arg11: Chat lineID
{{evt|CHAT_MSG_BN_INLINE_TOAST_CONVERSATION|Battle.net,Communication}}
; arg1: toast message (ie. FRIEND_OFFLINE, FRIEND_ONLINE)
; arg2: author
;arg11: Chat lineID
;arg13: Bnet presenceID
{{evt|CHAT_MSG_BN_WHISPER|Battle.net,Communication}}
; arg1: chat message
; arg2: author
; arg6: AFK/DND/GM "CHAT_FLAG_"..arg6 flags
;arg11: Chat lineID
;arg13: Bnet presenceID
{{evt|CHAT_MSG_BN_WHISPER_INFORM|Battle.net,Communication}}
;arg11: Chat lineID
;arg13: Bnet presenceID
{{evt|CHAT_MSG_CHANNEL|Communication}}
Fired when the client receives a channel message.
; arg1: chat message
; arg2: author
; arg3: language
; arg4: channel name with number ex: "1. General - Stormwind City"
* zone is always current zone even if not the same as the channel name
; arg5: target
* second player name when two users are passed for a CHANNEL_NOTICE_USER (E.G. x kicked y)
; arg6: AFK/DND/GM "CHAT_FLAG_"..arg6 flags
; arg7: zone ID used for generic system channels (1 for General, 2 for Trade, 22 for LocalDefense, 23 for WorldDefense and 26 for LFG)
* not used for custom channels or if you joined an Out-Of-Zone channel ex: "General - Stormwind City"
; arg8: channel number
; arg9: channel name without number (this is _sometimes_ in lowercase)
* zone is always current zone even if not the same as the channel name
;arg11: Chat lineID used for reporting the chat message.
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_CHANNEL_JOIN|Communication}}
Fired when someone joins a chat channel you are in
; arg1: seems to be empty
; arg2: Name of the player that joined
; arg3: seems to be empty again
; arg4: Number and name of the channel (e.g. "5. MyOwnChannel")
; arg8: Channel number
; arg9: channel name without number (this is sometimes in lowercase)
{{evt|CHAT_MSG_CHANNEL_LEAVE|Communication}}
Fired when a player leaves a channel that you are currently inside.
; arg1: Appears to be left blank
; arg2: Player name that left
; arg4: Channel name with number
; arg7: Appears to be left zero and no longer the channel number
; arg8: Channel number
; arg9: Channel name without number
{{evt|CHAT_MSG_CHANNEL_LIST|Communication}}
Fired when [[API ListChannels|ListChannels]]() or [[API ListChannelByName|ListChannelByName]]() is called, and the message is displayed in the chat frame.
; arg1: The list of values displayed by ListChannels() or ListChannelByName() in one string.
; arg4: The number and name of the channel the message came from. ie: "1. General"
{{evt|CHAT_MSG_CHANNEL_NOTICE|Communication}}
Fired when you enter or leave a chat channel (or a channel was recently throttled)
; arg1: type ( "YOU_JOINED" if you joined a channel, or "YOU_LEFT" if you left, or "THROTTLED" if channel was throttled )
; arg4: Channel name with number (e.g. "6. TestChannel")
; arg7: Channel Type (e.g. 0 for any user channel, 1 for system-channel "General", 2 for "Trade")
; arg8: Channel Number
; arg9: Channel name without number
{{evt|CHAT_MSG_CHANNEL_NOTICE_USER|Communication}}
Fired when something changes in the channel like moderation enabled, user is kicked, announcements changed and so on. CHAT_*_NOTICE in GlobalStrings.lua has a full list of available types.
; arg1: type ("ANNOUNCEMENTS_OFF", "ANNOUNCEMENTS_ON", "BANNED", "OWNER_CHANGED", "INVALID_NAME", "INVITE", "MODERATION_OFF", "MODERATION_ON", "MUTED", "NOT_MEMBER", "NOT_MODERATED", "SET_MODERATOR", "UNSET_MODERATOR" )
; arg2: If arg5 has a value then this is the user affected ( eg: "Player Foo has been kicked by Bar" ), if arg5 has no value then it's the person who caused the event ( eg: "Channel Moderation has been enabled by Bar" )
; arg4: Channel name with number
; arg5: Player that caused the event (eg "Player Foo has been kicked by Bar" )
{{evt|CHAT_MSG_COMBAT_FACTION_CHANGE|Combat}}
Fires when player's faction changes. i.e.: "Your reputation with Timbermaw Hold has very slightly increased." -- NEW 1.9
; arg1: chat message
;arg11: Chat lineID
{{evt|CHAT_MSG_COMBAT_HONOR_GAIN|Honor,Combat}}
Fired when the player gains any amount of honor, anything from an honorable kill to bonus honor awarded.
; arg1: chat message (format: "%s dies, honorable kill Rank: %s (Estimated Honor Points: %d)" or "You have been awarded %d honor.")
{{evt|CHAT_MSG_COMBAT_MISC_INFO|Misc}}
Fires when your equipment takes durability loss from death, and likely other situations as well.(no longer fires on reputation changes as of 1.9)
{{evt|CHAT_MSG_COMBAT_XP_GAIN|Player}}
Fired when you gain XP from killing a creature or finishing a quest. Does not fire if you gain no xp from killing a creature.
; arg1: chat message
{{evt|CHAT_MSG_DND|Communication}}
Fired when the client receives a Do-Not-Disturb auto-response
; arg1: DND response message
; arg2: author
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_EMOTE|Communication}}
Fired on sending or receiving a custom emote (one used by /e, /emote or a send chat message command with the emote flag)
; arg1: Message that was sent/received
; arg2: Name of the player who sent the message
;arg11: Chat lineID used for reporting the chat message.
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_FILTERED|Communication}}
{{evt|CHAT_MSG_GUILD|Communication,Guild}}
Fired when a message is sent or received in the Guild channel.
; arg1: Message that was sent
; arg2: Author
; arg3: Language that the message was sent in
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_GUILD_ACHIEVEMENT|Communication,Guild,Achievements}}
Fired when a guild member completes an achievement.
; arg1: The full body of the achievement broadcast message.
; arg2, arg5: Guildmember Name
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_IGNORED|Communication}}
Fired when you whisper a player that is ignoring you
When testing this event the character name is sent twice as arg1 and arg2, Blizzard appears to use arg2 and ignores arg1.
; arg1: Character name of who you tried to message
; arg2: Character name of who you tried to message
{{evt|CHAT_MSG_LOOT|Loot}}
Fired when loot text is sent to the chat window (someone selects need, greed, passes, rolls, receives).  This also fires messages like "Person creates <item>" via tradeskills, and "Person receives <item>" via a trade window.
; arg1: Chat message
;arg11: Chat lineID
{{evt|CHAT_MSG_MONEY|Loot}}
Fired when a unit loots money.
; arg1: Chat message
{{evt|CHAT_MSG_MONSTER_EMOTE|Communication}}
Fired for emotes from a monster, such as 'Murloc Forager attempts to run away in fear!'
; arg1: The body of the emote: '%s attempts to run away in fear!'
; arg2: The name of the monster: 'Murloc Forager'
<small>(Note: As of 1.12 arg1 now contains a %s string variable for where the mob name should be placed)</small>
{{evt|CHAT_MSG_MONSTER_SAY|Communication}}
Fired when a NPC says something.
; arg1: Message
; arg2: NPC name
; arg3: Language used
; arg4: Unused
; arg5: Receiver
{{evt|CHAT_MSG_MONSTER_WHISPER|Communication}}
Fired when a NPC whispers you something
{{evt|CHAT_MSG_MONSTER_PARTY|Communication}}
{{evt|CHAT_MSG_MONSTER_YELL|Communication}}
Fired when a NPC yells, example would be the yells during an Alterac Valley from the Herald or a raid boss.
; arg1: Message
; arg2: NPC Name (eg: [[Onyxia]])
{{evt|CHAT_MSG_OFFICER|Communication}}
Fired when a message is sent or received in the Guild Officer channel.
; arg1: Message that was received
; arg2: Author
; arg3: Language used
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_OPENING|Communication}}
{{evt|CHAT_MSG_PARTY|Communication,Party}}
Fired when a message is sent or received in the Party channel.
; arg1: Message that was received
; arg2: Author
; arg3: Language used
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_PARTY_LEADER|Communication,Party}}
Fired when a message is sent or received by the party leader.
; arg1: Message that was received
; arg2: Author
; arg3: Language used
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_PET_INFO|Communication}}
{{evt|CHAT_MSG_RAID|Communication,Party}}
Fired when a message is sent or received in the Raid.
; arg1: chat message
; arg2: author
; arg3: language
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_RAID_BOSS_EMOTE|Communication}}
; arg1: emote message
; arg2: Name of the boss
{{evt|CHAT_MSG_RAID_BOSS_WHISPER|Communication}}
{{evt|CHAT_MSG_RAID_LEADER|Communication,Party}}
Fired when a message is sent or received from the raid leader.
; arg1: chat message
; arg2: author
; arg3: language
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_RAID_WARNING|Communication,Party}}
Fired when a warning message is sent or received from the raid leader.
; arg1: chat message
; arg2: author
; arg3: language
;arg11: Chat lineID
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_RESTRICTED|Communication}}
{{evt|CHAT_MSG_SAY|Communication}}
Fired when a message is sent or received in the Say channel.
; arg1: chat message
; arg2: author
; arg3: language
;arg11: Chat lineID used for reporting the chat message.
;arg12: Sender [[API_UnitGUID|GUID]]
<u>Example:</u><br>
Place <tt>''this:RegisterEvent("CHAT_MSG_SAY");''</tt> in the <tt>&lt;OnLoad&gt;</tt>/<tt>&lt;/OnLoad&gt;</tt> section of your MyMod.xml file.<br>
Then, have an <tt>''if (event == "CHAT_MSG_SAY") then MyMod_Say(event, arg1, arg2, arg3); end''</tt> line, or something like it, in the <tt>&lt;OnEvent&gt;</tt>/<tt>&lt;/OnEvent&gt;</tt> section
of your MyMod.xml file.
Then, have a function like the following in your MyMod.lua file:<br>
function MyMod_Say(event, arg1, arg2, arg3)
  PrevMsg = arg1;
  PrevPlyr = arg2;
  PrevLang = arg3;
end
This would store the previous message, player who said it, and language it was said in into some variables.
{{evt|CHAT_MSG_SKILL|Player,Skill}}
Fired when some chat messages about skills are displayed.
; arg1: The content of the chat message.
'''arg1''' formats are found in Blizzard's <tt>GlobalStrings.lua</tt>.  Some possibilities:
* <tt>ERR_SKILL_GAINED_S</tt> (eg. "You have gained the Blacksmithing skill.")
* <tt>ERR_SKILL_UP_SI</tt> (eg. "Your skill in Cooking has increased to 221.")
{{evt|CHAT_MSG_SYSTEM|Communication}}
Fired when a system chat message (they are displayed in yellow) is received.
; arg1: The content of the chat message.
'''arg1''' formats are found in Blizzard's <tt>GlobalStrings.lua</tt>.  Some possibilities:
* <tt>ERR_LEARN_RECIPE_S</tt> (eg. "You have learned how to create a new item: Bristle Whisker Catfish.")
* <tt>MARKED_AFK_MESSAGE</tt> (eg. "You are now AFK: Away from Keyboard")
''Note:'' Be very careful with assuming when the event is actually sent. For example, "Quest accepted: Quest Title" is sent before the quest log updates, so at the time of the event the player's quest log does not yet contain the quest. Similarly, "Quest Title completed." is sent before the quest is removed from the quest log, so at the time of the event the player's quest log still contains the quest.
{{evt|CHAT_MSG_TARGETICONS|Communication}}
Fired when a [[target markers|target marker]] is set.  This is used by the chat filter, if the player is watching target markers in chat output (in the Filters right-click menu, under Other, look for Target Icons).
; arg1: The formatted message to be displayed in the chat window.
;arg12: Some kind of number; no more is known at the time of writing.  (Yes, that's a "12", not a typo for "2".)
arg1 is formatted from the global variable <tt>TARGET_ICON_SET</tt>, which by default in an English client is set to the string
: "|Hplayer:%s|h[%s]|h sets |TInterface\\TargetingFrame\\UI-RaidTargetingIcon_%d:0|t on %s."
The other arguments are unused.
{{evt|CHAT_MSG_TRADESKILLS|Communication}}
{{evt|CHAT_MSG_TEXT_EMOTE|Communication}}
Fired for emotes with an emote token. /dance, /healme, etc
; arg1: Emote Message
; arg2: Name of person who emoted
;arg11: Chat lineID used for reporting the chat message.
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_WHISPER|Communication}}
Fired when a whisper is received from another player.
; arg1: Message received
; arg2: Author
; arg3: Language (or nil if universal, like messages from GM) (always seems to be an empty string; argument may have been kicked because whispering in non-standard language doesn't seem to be possible [any more?])
; arg6: status (like "DND" or "GM")
; arg7: (number) message id (for reporting spam purposes?) (default: 0)
; arg8: (number) unknown (default: 0)
;arg11: Chat lineID used for reporting the chat message.
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_WHISPER_INFORM|Communication}}
Fired when the player sends a whisper to another player
; arg1: Message sent
; arg2: Player who was sent the whisper
; arg3: Language
;arg11: Chat lineID
;arg12: Receiver [[API_UnitGUID|GUID]]
{{evt|CHAT_MSG_YELL|Communication}}
Fired when a message is sent or received in the Yell channel.
; arg1: Message that was received
; arg2: Author
; arg3: Language used
;arg11: Chat lineID used for reporting the chat message.
;arg12: Sender [[API_UnitGUID|GUID]]
{{evt|CINEMATIC_START|Misc}}
{{evt|CINEMATIC_STOP|Misc}}
{{evt|CLOSE_INBOX_ITEM|Mail}}
{{evt|CLOSE_TABARD_FRAME|Misc}}
Fired when the guild dress frame is closed
{{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.
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).
<br>The effect is a code that executes only when the map closes.
{{evt|COMBAT_LOG_EVENT|Combat}}
<Added in Patch '''2.4.0'''> See [[API COMBAT LOG EVENT]].
<br>This event fires only if it matches current global combat log filter settings.
{{evt|COMBAT_LOG_EVENT_UNFILTERED|Combat}}
<Added in Patch '''2.4.0'''> See [[API COMBAT LOG EVENT]].
<br>AddOns wanting to parse all events the moment they happen should register for this event.
(See this [http://forums.worldofwarcraft.com/thread.html?topicId=2968233433&sid=1&pageNo=9#177 blue posting] for more info)
; arg1: timestamp
; arg2: [http://www.wowwiki.com/API_COMBAT_LOG_EVENT#Events event]
; arg3: source[http://www.wowwiki.com/API_UnitGUID GUID]
; arg4: source[http://www.wowwiki.com/API_UnitName Name]
; arg5: source[http://www.wowwiki.com/UnitFlag Flags]
; arg6: destGUID
; arg7: destName
; arg8: destFlags
; arg9: spellID
;arg10: spellName
;arg11: [http://www.wowwiki.com/API_COMBAT_LOG_EVENT#Spell_School spellSchool]
;arg12: SuffixParam1
;arg13: SuffixParam2
;arg14: SuffixParam3
;arg15: SuffixParam4
;arg16: SuffixParam5
;arg17: SuffixParam6
;arg18: SuffixParam7
;arg19: SuffixParam8
;arg20: SuffixParam9
{{evt|COMBAT_RATING_UPDATE|Player}}
{{evt|COMBAT_TEXT_UPDATE|Combat}}
<Added in Patch '''1.12'''>
<br>Fired when the currently watched entity (as set by the {{api|CombatTextSetActiveUnit}} function) takes or avoids damage, receives heals, gains mana/energy/rage, etc. This event is used by Blizzard's floating combat text addon.
; arg1: Combat message type. Known values include "DAMAGE", "SPELL_DAMAGE", "DAMAGE_CRIT", "HEAL", "PERIODIC_HEAL", "HEAL_CRIT", "MISS", "DODGE", "PARRY", "BLOCK", "RESIST", "SPELL_RESISTED", "ABSORB", "SPELL_ABSORBED", "MANA", "ENERGY", "RAGE", "FOCUS", "SPELL_ACTIVE", "COMBO_POINTS", "AURA_START", "AURA_END", "AURA_START_HARMFUL", "AURA_END_HARMFUL", "HONOR_GAINED", and "FACTION".
; arg2: For damage, power gain and honor gains, this is the amount taken/gained. For heals, this is the healer name. For auras, the aura name. For block/resist/absorb messages where arg3 is not nil (indicating a partial block/resist/absorb) this is the amount taken. For faction gain, this is the faction name. For the SPELL_ACTIVE message, the name of the spell (abilities like Overpower and Riposte becoming active will trigger this message).
; arg3: For heals, the amount healed. For block/resist/absorb messages, this is the amount blocked/resisted/absorbed, or nil if all damage was avoided. For faction gain, the amount of reputation gained.
arg3 does NOT return amount absorbed since at least patch 2.4
{{evt|COMMENTATOR_ENTER_WORLD|Non-Public}}
Fired when the character logs in and the server sends the greeting text. (Currently "Scammers are trying harder than ever to phish for your account information!...")  This is not fired when reloading the UI.
No arguments.
{{evt|COMMENTATOR_MAP_UPDATE|Non-Public}}
{{evt|COMMENTATOR_PLAYER_UPDATE|Non-Public}}
{{evt|COMMENTATOR_SKIRMISH_MODE_REQUEST|Non-Public}}
{{evt|COMMENTATOR_SKIRMISH_QUEUE_REQUEST|Non-Public}}
{{evt|COMPANION_LEARNED|Companion}}
<Added in Patch '''3.0''' (WotLK)>
{{evt|COMPANION_UNLEARNED|Companion}}
{{evt|COMPANION_UPDATE|Companion}}
<Added in Patch '''3.0''' (WotLK)>
If the type is nil, the UI should update if it's visible, regardless of which type it's managing. If the type is non-nil, then it will be either "CRITTER" or "MOUNT" and that signifies that the active companion has changed and the UI should update if it's currently showing that type.
This event fires when any of the following conditions occur:
* You, or anyone within range, summons or dismisses a critter
* You, or anyone within range, mounts or dismounts
* Someone enters range with a critter summoned
* Someone enters range while mounted
"Range" appears to be at least 40 yards.  If you are in a major city, expect this event to fire constantly.
{{evt|CONFIRM_BINDER|Misc}}
{{evt|CONFIRM_DISENCHANT_ROLL|Loot}}
<Added in patch '''3.3'''>
<br>Fires when you try to roll "disenchant" for and item which Binds on Pickup.
; arg1: RollId
; arg2: roll (Need: 1, Greed: 2, Disenchant: 3; as in [[API RollOnLoot|RollOnLoot(RollID, roll)]])
Note that arg2 should always be 3. In other cases the event "CONFIRM_LOOT_ROLL" would be fired.
{{evt|CONFIRM_LOOT_ROLL|Loot}}
Fires when you try to roll "need" or "greed" for and item which Binds on Pickup.
; arg1: RollId
; arg2: roll (Need: 1, Greed: 2, Disenchant: 3; as in [[API RollOnLoot|RollOnLoot(RollID, roll)]])
Note that arg2 should never be 3. In that case the event "CONFIRM_DISENCHANT_ROLL" would be fired.
{{evt|CONFIRM_SUMMON|Misc}}
{{evt|CONFIRM_TALENT_WIPE|Misc}}
Fires when the user selects the "Yes, I do." confirmation prompt after speaking to a class trainer and choosing to unlearn their talents.
; arg1: Cost (260000 is equivalent to 26g). This value is then passed to different frames, depending on where the event is being handled, by calling the MoneyFrame_Update() function.  In the case of this event, the cost of the transaction is displayed in a small static popup, and the user prompted for confirmation one final time.
{{evt|CONFIRM_XP_LOSS|Death}}
Accept durability(!) loss in exchange for his body back.
''History: Way back before WoW was released, you lost experience rather than durability when you resurrected at a spirit healer.''
{{evt|CORPSE_IN_INSTANCE|Death}}
{{evt|CORPSE_IN_RANGE|Death}}
Fired when the player is in range of his body.
{{evt|CORPSE_OUT_OF_RANGE|Death}}
Fired when the player is out of range of his body.
{{evt|CRITERIA_UPDATE|Achievements}}
Fired when the criteria for an achievement has changed.
(''Fires several times at once, presumably for different levels of achievements and yet-unknown feats of strength, but this has yet to be confirmed and there may be another use for this Event. [[User:Joequincy|joequincy]] ([[User talk:Joequincy|talk]]) 18:24, 20 October 2008 (UTC)'')
{{evt|CURRENT_SPELL_CAST_CHANGED|Spell}}
Fired when the spell being cast is changed.
{{evt|CURRENCY_DISPLAY_UPDATE|Player,Misc}}
{{evt|CURSOR_UPDATE|Misc}}
Fired when the player right-clicks terrain, and on mouseover before UPDATE_MOUSEOVER_UNIT and on mouseout after UPDATE_MOUSEOVER_UNIT. This excludes doodads, player characters, and NPCs that lack interaction.
{{evt|CVAR_UPDATE|System}}
Fired when a CVar is changed
; arg1: cvarname
; arg2: value

Latest revision as of 04:48, 15 August 2023

Event API


[edit]
"CALENDAR_ACTION_PENDING"
Category: Calendar
 

Fired when the calendar API is busy or free

arg1
busyFlag
"CALENDAR_CLOSE_EVENT"
Category: Calendar
 
"CALENDAR_EVENT_ALARM"
Category: Calendar
 
"CALENDAR_NEW_EVENT"
Category: Calendar
 
"CALENDAR_OPEN_EVENT"
Category: Calendar
 

Fired after calling CalendarOpenEvent once the event data has been retrieved from the server

"CALENDAR_UPDATE_INVITE_LIST"
Category: Calendar
 

Fired after CalendarEventSortInvites once the invite list has been sorted.

"CALENDAR_UPDATE_ERROR"
Category: Calendar
 
"CALENDAR_UPDATE_EVENT"
Category: Calendar
 
"CALENDAR_UPDATE_EVENT_LIST"
Category: Calendar
 
"CALENDAR_UPDATE_PENDING_INVITES"
Category: Calendar
 
"CANCEL_LOOT_ROLL"
Category: Loot
 

Fired when a player cancels a roll on an item

arg1
rollID
"CANCEL_SUMMON"
Category: Player
 
"CHANNEL_COUNT_UPDATE"
Category: Misc
 

Fired when number of players in a channel changes but only if this channel is visible in ChannelFrame (it mustn't be hidden by a collapsed category header)

arg1
channel id (item number in Blizzards ChannelFrame -> quod vide API GetChannelDisplayInfo)
arg2
number of players in channel
"CHANNEL_FLAGS_UPDATED"
Category: Misc
 

Fired when user changes selected channel in Blizzards ChannelFrame

arg1
channel id (item number in Blizzards ChannelFrame -> quod vide API GetChannelDisplayInfo)
"CHANNEL_INVITE_REQUEST"
Category: Communication
 
"CHANNEL_PASSWORD_REQUEST"
Category: Misc
 

Fired when user is asked for a password (normally after trying to join a channel without a password or with a wrong one)

arg1
channel name
"CHANNEL_ROSTER_UPDATE"
Category: Misc
 

Fired when user changes selected channel in Blizzards ChannelFrame or number of players in currently selected channel changes

arg1
channel id (item number in Blizzards ChannelFrame -> quod vide API GetChannelDisplayInfo)
arg2
number of players in channel
"CHANNEL_UI_UPDATE"
Category: Misc
 

Fired when Channel UI should change (e.g. joining / leaving a channel causes this event to fire)

"CHANNEL_VOICE_UPDATE"
Category: Misc
 
arg1
unknown
arg2
unknown
arg3
unknown
"CHARACTER_POINTS_CHANGED"
Category: Player
 

Fired when the player's available talent points change

arg1
indicates number of talent points changed: -1 indicates one used (learning a talent), 1 indicates one gained (leveling)
"CHAT_MSG_ACHIEVEMENT"
Category: Communication,Guild,Achievements
 

Fired when a player in your vicinity completes an achievement.

arg1
The full body of the broadcast message.
arg2, arg5
The name of player who has just completed the achievement.
arg7, arg8
Some integer.
"CHAT_MSG_ADDON"
Category: Communication
 

<Added in Patch 1.12>
Fired when the client receives a message from SendAddonMessage
Since patch 4.1, you must register the addon prefix with RegisterAddonMessagePrefix otherwise, events triggered by other players are blocked.

arg1
prefix
arg2
message
arg3
distribution type ("PARTY", "RAID", "GUILD", "BATTLEGROUND" or "WHISPER")
arg4
sender
"CHAT_MSG_AFK"
Category: Communication
 

Fired when the client receives an AFK auto-response

arg1
AFK response message
arg2
author
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_BATTLEGROUND"
Category: Communication,Battleground
 

<Added in Patch 1.12>
Fired when a message is received through the battleground group channel

arg1
chat message
arg2
author
arg3
language
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_BATTLEGROUND_LEADER"
Category: Communication,Battleground
 

<Added in Patch 1.12>
Fired when a message is received from the leader of the battleground group

arg1
chat message
arg2
author
arg3
language
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_BG_SYSTEM_ALLIANCE"
Category: Communication,Battleground
 

Fired for alliance specific events in the battleground such as assaulting a graveyard.

arg1
Battleground Message (eg. "The Alliance has taken the Blacksmith!")
"CHAT_MSG_BG_SYSTEM_HORDE"
Category: Communication,Battleground
 

Fired for horde specific events in the battleground such as assaulting a graveyard.

arg1
Battleground Message (eg. "The Horde has taken the Blacksmith!")
"CHAT_MSG_BG_SYSTEM_NEUTRAL"
Category: Communication,Battleground
 

Fired for non faction specific events in the battlegrounds such as the battle start announcement.

arg1
Battleground Message (eg. "Let the battle for Warsong Gulch begin.")
"CHAT_MSG_BN_CONVERSATION"
Category: Battle.net,Communication
 
"CHAT_MSG_BN_CONVERSATION_LIST"
Category: Battle.net,Communication
 
"CHAT_MSG_BN_CONVERSATION_NOTICE"
Category: Battle.net,Communication
 
"CHAT_MSG_BN_INLINE_TOAST_ALERT"
Category: Battle.net,Communication
 
"CHAT_MSG_BN_INLINE_TOAST_BROADCAST"
Category: Battle.net,Communication
 
"CHAT_MSG_BN_INLINE_TOAST_BROADCAST_INFORM"
Category: Battle.net,Communication
 

Fired when the Bnet Real ID Broadcast Message is changed or from API BNSetCustomMessage

arg1
Broadcast Message
arg11
Chat lineID
"CHAT_MSG_BN_INLINE_TOAST_CONVERSATION"
Category: Battle.net,Communication
 
arg1
toast message (ie. FRIEND_OFFLINE, FRIEND_ONLINE)
arg2
author
arg11
Chat lineID
arg13
Bnet presenceID
"CHAT_MSG_BN_WHISPER"
Category: Battle.net,Communication
 
arg1
chat message
arg2
author
arg6
AFK/DND/GM "CHAT_FLAG_"..arg6 flags
arg11
Chat lineID
arg13
Bnet presenceID
"CHAT_MSG_BN_WHISPER_INFORM"
Category: Battle.net,Communication
 
arg11
Chat lineID
arg13
Bnet presenceID
"CHAT_MSG_CHANNEL"
Category: Communication
 

Fired when the client receives a channel message.

arg1
chat message
arg2
author
arg3
language
arg4
channel name with number ex: "1. General - Stormwind City"
  • zone is always current zone even if not the same as the channel name
arg5
target
  • second player name when two users are passed for a CHANNEL_NOTICE_USER (E.G. x kicked y)
arg6
AFK/DND/GM "CHAT_FLAG_"..arg6 flags
arg7
zone ID used for generic system channels (1 for General, 2 for Trade, 22 for LocalDefense, 23 for WorldDefense and 26 for LFG)
  • not used for custom channels or if you joined an Out-Of-Zone channel ex: "General - Stormwind City"
arg8
channel number
arg9
channel name without number (this is _sometimes_ in lowercase)
  • zone is always current zone even if not the same as the channel name
arg11
Chat lineID used for reporting the chat message.
arg12
Sender GUID
"CHAT_MSG_CHANNEL_JOIN"
Category: Communication
 

Fired when someone joins a chat channel you are in

arg1
seems to be empty
arg2
Name of the player that joined
arg3
seems to be empty again
arg4
Number and name of the channel (e.g. "5. MyOwnChannel")
arg8
Channel number
arg9
channel name without number (this is sometimes in lowercase)
"CHAT_MSG_CHANNEL_LEAVE"
Category: Communication
 

Fired when a player leaves a channel that you are currently inside.

arg1
Appears to be left blank
arg2
Player name that left
arg4
Channel name with number
arg7
Appears to be left zero and no longer the channel number
arg8
Channel number
arg9
Channel name without number
"CHAT_MSG_CHANNEL_LIST"
Category: Communication
 

Fired when ListChannels() or ListChannelByName() is called, and the message is displayed in the chat frame.

arg1
The list of values displayed by ListChannels() or ListChannelByName() in one string.
arg4
The number and name of the channel the message came from. ie: "1. General"
"CHAT_MSG_CHANNEL_NOTICE"
Category: Communication
 

Fired when you enter or leave a chat channel (or a channel was recently throttled)

arg1
type ( "YOU_JOINED" if you joined a channel, or "YOU_LEFT" if you left, or "THROTTLED" if channel was throttled )
arg4
Channel name with number (e.g. "6. TestChannel")
arg7
Channel Type (e.g. 0 for any user channel, 1 for system-channel "General", 2 for "Trade")
arg8
Channel Number
arg9
Channel name without number
"CHAT_MSG_CHANNEL_NOTICE_USER"
Category: Communication
 

Fired when something changes in the channel like moderation enabled, user is kicked, announcements changed and so on. CHAT_*_NOTICE in GlobalStrings.lua has a full list of available types.

arg1
type ("ANNOUNCEMENTS_OFF", "ANNOUNCEMENTS_ON", "BANNED", "OWNER_CHANGED", "INVALID_NAME", "INVITE", "MODERATION_OFF", "MODERATION_ON", "MUTED", "NOT_MEMBER", "NOT_MODERATED", "SET_MODERATOR", "UNSET_MODERATOR" )
arg2
If arg5 has a value then this is the user affected ( eg: "Player Foo has been kicked by Bar" ), if arg5 has no value then it's the person who caused the event ( eg: "Channel Moderation has been enabled by Bar" )
arg4
Channel name with number
arg5
Player that caused the event (eg "Player Foo has been kicked by Bar" )
"CHAT_MSG_COMBAT_FACTION_CHANGE"
Category: Combat
 

Fires when player's faction changes. i.e.: "Your reputation with Timbermaw Hold has very slightly increased." -- NEW 1.9

arg1
chat message
arg11
Chat lineID
"CHAT_MSG_COMBAT_HONOR_GAIN"
Category: Honor,Combat
 

Fired when the player gains any amount of honor, anything from an honorable kill to bonus honor awarded.

arg1
chat message (format: "%s dies, honorable kill Rank: %s (Estimated Honor Points: %d)" or "You have been awarded %d honor.")
"CHAT_MSG_COMBAT_MISC_INFO"
Category: Misc
 

Fires when your equipment takes durability loss from death, and likely other situations as well.(no longer fires on reputation changes as of 1.9)

"CHAT_MSG_COMBAT_XP_GAIN"
Category: Player
 

Fired when you gain XP from killing a creature or finishing a quest. Does not fire if you gain no xp from killing a creature.

arg1
chat message
"CHAT_MSG_DND"
Category: Communication
 

Fired when the client receives a Do-Not-Disturb auto-response

arg1
DND response message
arg2
author
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_EMOTE"
Category: Communication
 

Fired on sending or receiving a custom emote (one used by /e, /emote or a send chat message command with the emote flag)

arg1
Message that was sent/received
arg2
Name of the player who sent the message
arg11
Chat lineID used for reporting the chat message.
arg12
Sender GUID
"CHAT_MSG_FILTERED"
Category: Communication
 
"CHAT_MSG_GUILD"
Category: Communication,Guild
 

Fired when a message is sent or received in the Guild channel.

arg1
Message that was sent
arg2
Author
arg3
Language that the message was sent in
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_GUILD_ACHIEVEMENT"
Category: Communication,Guild,Achievements
 

Fired when a guild member completes an achievement.

arg1
The full body of the achievement broadcast message.
arg2, arg5
Guildmember Name
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_IGNORED"
Category: Communication
 

Fired when you whisper a player that is ignoring you When testing this event the character name is sent twice as arg1 and arg2, Blizzard appears to use arg2 and ignores arg1.

arg1
Character name of who you tried to message
arg2
Character name of who you tried to message
"CHAT_MSG_LOOT"
Category: Loot
 

Fired when loot text is sent to the chat window (someone selects need, greed, passes, rolls, receives). This also fires messages like "Person creates <item>" via tradeskills, and "Person receives <item>" via a trade window.

arg1
Chat message
arg11
Chat lineID
"CHAT_MSG_MONEY"
Category: Loot
 

Fired when a unit loots money.

arg1
Chat message
"CHAT_MSG_MONSTER_EMOTE"
Category: Communication
 

Fired for emotes from a monster, such as 'Murloc Forager attempts to run away in fear!'

arg1
The body of the emote: '%s attempts to run away in fear!'
arg2
The name of the monster: 'Murloc Forager'

(Note: As of 1.12 arg1 now contains a %s string variable for where the mob name should be placed)

"CHAT_MSG_MONSTER_SAY"
Category: Communication
 

Fired when a NPC says something.

arg1
Message
arg2
NPC name
arg3
Language used
arg4
Unused
arg5
Receiver
"CHAT_MSG_MONSTER_WHISPER"
Category: Communication
 

Fired when a NPC whispers you something

"CHAT_MSG_MONSTER_PARTY"
Category: Communication
 
"CHAT_MSG_MONSTER_YELL"
Category: Communication
 

Fired when a NPC yells, example would be the yells during an Alterac Valley from the Herald or a raid boss.

arg1
Message
arg2
NPC Name (eg: Onyxia)
"CHAT_MSG_OFFICER"
Category: Communication
 

Fired when a message is sent or received in the Guild Officer channel.

arg1
Message that was received
arg2
Author
arg3
Language used
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_OPENING"
Category: Communication
 
"CHAT_MSG_PARTY"
Category: Communication,Party
 

Fired when a message is sent or received in the Party channel.

arg1
Message that was received
arg2
Author
arg3
Language used
arg11
Chat lineID
arg12
Sender GUID


"CHAT_MSG_PARTY_LEADER"
Category: Communication,Party
 

Fired when a message is sent or received by the party leader.

arg1
Message that was received
arg2
Author
arg3
Language used
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_PET_INFO"
Category: Communication
 
"CHAT_MSG_RAID"
Category: Communication,Party
 

Fired when a message is sent or received in the Raid.

arg1
chat message
arg2
author
arg3
language
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_RAID_BOSS_EMOTE"
Category: Communication
 
arg1
emote message
arg2
Name of the boss
"CHAT_MSG_RAID_BOSS_WHISPER"
Category: Communication
 
"CHAT_MSG_RAID_LEADER"
Category: Communication,Party
 

Fired when a message is sent or received from the raid leader.

arg1
chat message
arg2
author
arg3
language
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_RAID_WARNING"
Category: Communication,Party
 

Fired when a warning message is sent or received from the raid leader.

arg1
chat message
arg2
author
arg3
language
arg11
Chat lineID
arg12
Sender GUID
"CHAT_MSG_RESTRICTED"
Category: Communication
 
"CHAT_MSG_SAY"
Category: Communication
 

Fired when a message is sent or received in the Say channel.

arg1
chat message
arg2
author
arg3
language
arg11
Chat lineID used for reporting the chat message.
arg12
Sender GUID

Example:
Place this:RegisterEvent("CHAT_MSG_SAY"); in the <OnLoad>/</OnLoad> section of your MyMod.xml file.
Then, have an if (event == "CHAT_MSG_SAY") then MyMod_Say(event, arg1, arg2, arg3); end line, or something like it, in the <OnEvent>/</OnEvent> section

of your MyMod.xml file.

Then, have a function like the following in your MyMod.lua file:

function MyMod_Say(event, arg1, arg2, arg3)
  PrevMsg = arg1;
  PrevPlyr = arg2;
  PrevLang = arg3;
end

This would store the previous message, player who said it, and language it was said in into some variables.

"CHAT_MSG_SKILL"
Category: Player,Skill
 

Fired when some chat messages about skills are displayed.

arg1
The content of the chat message.

arg1 formats are found in Blizzard's GlobalStrings.lua. Some possibilities:

  • ERR_SKILL_GAINED_S (eg. "You have gained the Blacksmithing skill.")
  • ERR_SKILL_UP_SI (eg. "Your skill in Cooking has increased to 221.")
"CHAT_MSG_SYSTEM"
Category: Communication
 

Fired when a system chat message (they are displayed in yellow) is received.

arg1
The content of the chat message.

arg1 formats are found in Blizzard's GlobalStrings.lua. Some possibilities:

  • ERR_LEARN_RECIPE_S (eg. "You have learned how to create a new item: Bristle Whisker Catfish.")
  • MARKED_AFK_MESSAGE (eg. "You are now AFK: Away from Keyboard")

Note: Be very careful with assuming when the event is actually sent. For example, "Quest accepted: Quest Title" is sent before the quest log updates, so at the time of the event the player's quest log does not yet contain the quest. Similarly, "Quest Title completed." is sent before the quest is removed from the quest log, so at the time of the event the player's quest log still contains the quest.

"CHAT_MSG_TARGETICONS"
Category: Communication
 

Fired when a target marker is set. This is used by the chat filter, if the player is watching target markers in chat output (in the Filters right-click menu, under Other, look for Target Icons).

arg1
The formatted message to be displayed in the chat window.
arg12
Some kind of number; no more is known at the time of writing. (Yes, that's a "12", not a typo for "2".)

arg1 is formatted from the global variable TARGET_ICON_SET, which by default in an English client is set to the string

"|Hplayer:%s|h[%s]|h sets |TInterface\\TargetingFrame\\UI-RaidTargetingIcon_%d:0|t on %s."

The other arguments are unused.

"CHAT_MSG_TRADESKILLS"
Category: Communication
 
"CHAT_MSG_TEXT_EMOTE"
Category: Communication
 

Fired for emotes with an emote token. /dance, /healme, etc

arg1
Emote Message
arg2
Name of person who emoted
arg11
Chat lineID used for reporting the chat message.
arg12
Sender GUID
"CHAT_MSG_WHISPER"
Category: Communication
 

Fired when a whisper is received from another player.

arg1
Message received
arg2
Author
arg3
Language (or nil if universal, like messages from GM) (always seems to be an empty string; argument may have been kicked because whispering in non-standard language doesn't seem to be possible [any more?])
arg6
status (like "DND" or "GM")
arg7
(number) message id (for reporting spam purposes?) (default: 0)
arg8
(number) unknown (default: 0)
arg11
Chat lineID used for reporting the chat message.
arg12
Sender GUID
"CHAT_MSG_WHISPER_INFORM"
Category: Communication
 

Fired when the player sends a whisper to another player

arg1
Message sent
arg2
Player who was sent the whisper
arg3
Language
arg11
Chat lineID
arg12
Receiver GUID
"CHAT_MSG_YELL"
Category: Communication
 

Fired when a message is sent or received in the Yell channel.

arg1
Message that was received
arg2
Author
arg3
Language used
arg11
Chat lineID used for reporting the chat message.
arg12
Sender GUID
"CINEMATIC_START"
Category: Misc
 
"CINEMATIC_STOP"
Category: Misc
 
"CLOSE_INBOX_ITEM"
Category: Mail
 
"CLOSE_TABARD_FRAME"
Category: Misc
 

Fired when the guild dress frame is closed

"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).
The effect is a code that executes only when the map closes.

"COMBAT_LOG_EVENT"
Category: Combat
 

<Added in Patch 2.4.0> See API COMBAT LOG EVENT.
This event fires only if it matches current global combat log filter settings.

"COMBAT_LOG_EVENT_UNFILTERED"
Category: Combat
 

<Added in Patch 2.4.0> See API COMBAT LOG EVENT.
AddOns wanting to parse all events the moment they happen should register for this event. (See this blue posting for more info)

arg1
timestamp
arg2
event
arg3
sourceGUID
arg4
sourceName
arg5
sourceFlags
arg6
destGUID
arg7
destName
arg8
destFlags
arg9
spellID
arg10
spellName
arg11
spellSchool
arg12
SuffixParam1
arg13
SuffixParam2
arg14
SuffixParam3
arg15
SuffixParam4
arg16
SuffixParam5
arg17
SuffixParam6
arg18
SuffixParam7
arg19
SuffixParam8
arg20
SuffixParam9
"COMBAT_RATING_UPDATE"
Category: Player
 
"COMBAT_TEXT_UPDATE"
Category: Combat
 

<Added in Patch 1.12>
Fired when the currently watched entity (as set by the CombatTextSetActiveUnit function) takes or avoids damage, receives heals, gains mana/energy/rage, etc. This event is used by Blizzard's floating combat text addon.

arg1
Combat message type. Known values include "DAMAGE", "SPELL_DAMAGE", "DAMAGE_CRIT", "HEAL", "PERIODIC_HEAL", "HEAL_CRIT", "MISS", "DODGE", "PARRY", "BLOCK", "RESIST", "SPELL_RESISTED", "ABSORB", "SPELL_ABSORBED", "MANA", "ENERGY", "RAGE", "FOCUS", "SPELL_ACTIVE", "COMBO_POINTS", "AURA_START", "AURA_END", "AURA_START_HARMFUL", "AURA_END_HARMFUL", "HONOR_GAINED", and "FACTION".
arg2
For damage, power gain and honor gains, this is the amount taken/gained. For heals, this is the healer name. For auras, the aura name. For block/resist/absorb messages where arg3 is not nil (indicating a partial block/resist/absorb) this is the amount taken. For faction gain, this is the faction name. For the SPELL_ACTIVE message, the name of the spell (abilities like Overpower and Riposte becoming active will trigger this message).
arg3
For heals, the amount healed. For block/resist/absorb messages, this is the amount blocked/resisted/absorbed, or nil if all damage was avoided. For faction gain, the amount of reputation gained.

arg3 does NOT return amount absorbed since at least patch 2.4

"COMMENTATOR_ENTER_WORLD"
Category: Non-Public
 

Fired when the character logs in and the server sends the greeting text. (Currently "Scammers are trying harder than ever to phish for your account information!...") This is not fired when reloading the UI.

No arguments.

"COMMENTATOR_MAP_UPDATE"
Category: Non-Public
 
"COMMENTATOR_PLAYER_UPDATE"
Category: Non-Public
 
"COMMENTATOR_SKIRMISH_MODE_REQUEST"
Category: Non-Public
 
"COMMENTATOR_SKIRMISH_QUEUE_REQUEST"
Category: Non-Public
 
"COMPANION_LEARNED"
Category: Companion
 

<Added in Patch 3.0 (WotLK)>

"COMPANION_UNLEARNED"
Category: Companion
 
"COMPANION_UPDATE"
Category: Companion
 

<Added in Patch 3.0 (WotLK)>

If the type is nil, the UI should update if it's visible, regardless of which type it's managing. If the type is non-nil, then it will be either "CRITTER" or "MOUNT" and that signifies that the active companion has changed and the UI should update if it's currently showing that type.

This event fires when any of the following conditions occur:

  • You, or anyone within range, summons or dismisses a critter
  • You, or anyone within range, mounts or dismounts
  • Someone enters range with a critter summoned
  • Someone enters range while mounted

"Range" appears to be at least 40 yards. If you are in a major city, expect this event to fire constantly.

"CONFIRM_BINDER"
Category: Misc
 
"CONFIRM_DISENCHANT_ROLL"
Category: Loot
 

<Added in patch 3.3>
Fires when you try to roll "disenchant" for and item which Binds on Pickup.

arg1
RollId
arg2
roll (Need: 1, Greed: 2, Disenchant: 3; as in RollOnLoot(RollID, roll))

Note that arg2 should always be 3. In other cases the event "CONFIRM_LOOT_ROLL" would be fired.

"CONFIRM_LOOT_ROLL"
Category: Loot
 

Fires when you try to roll "need" or "greed" for and item which Binds on Pickup.

arg1
RollId
arg2
roll (Need: 1, Greed: 2, Disenchant: 3; as in RollOnLoot(RollID, roll))

Note that arg2 should never be 3. In that case the event "CONFIRM_DISENCHANT_ROLL" would be fired.

"CONFIRM_SUMMON"
Category: Misc
 
"CONFIRM_TALENT_WIPE"
Category: Misc
 

Fires when the user selects the "Yes, I do." confirmation prompt after speaking to a class trainer and choosing to unlearn their talents.

arg1
Cost (260000 is equivalent to 26g). This value is then passed to different frames, depending on where the event is being handled, by calling the MoneyFrame_Update() function. In the case of this event, the cost of the transaction is displayed in a small static popup, and the user prompted for confirmation one final time.
"CONFIRM_XP_LOSS"
Category: Death
 

Accept durability(!) loss in exchange for his body back.

History: Way back before WoW was released, you lost experience rather than durability when you resurrected at a spirit healer.

"CORPSE_IN_INSTANCE"
Category: Death
 
"CORPSE_IN_RANGE"
Category: Death
 

Fired when the player is in range of his body.

"CORPSE_OUT_OF_RANGE"
Category: Death
 

Fired when the player is out of range of his body.

"CRITERIA_UPDATE"
Category: Achievements
 

Fired when the criteria for an achievement has changed. (Fires several times at once, presumably for different levels of achievements and yet-unknown feats of strength, but this has yet to be confirmed and there may be another use for this Event. joequincy (talk) 18:24, 20 October 2008 (UTC))

"CURRENT_SPELL_CAST_CHANGED"
Category: Spell
 

Fired when the spell being cast is changed.

"CURRENCY_DISPLAY_UPDATE"
Category: Player,Misc
 
"CURSOR_UPDATE"
Category: Misc
 

Fired when the player right-clicks terrain, and on mouseover before UPDATE_MOUSEOVER_UNIT and on mouseout after UPDATE_MOUSEOVER_UNIT. This excludes doodads, player characters, and NPCs that lack interaction.

"CVAR_UPDATE"
Category: System
 

Fired when a CVar is changed

arg1
cvarname
arg2
value