Wikia

WoWWiki

Events/P

Talk0
101,502pages on
this wiki

< Events

Event API


Edit
"PARTY_CONVERTED_TO_RAID"
Category: Party, Raid
 

?

"PARTY_INVITE_CANCEL"
Category: Party
 

Fired when you decline a party invite.


"PARTY_INVITE_REQUEST"
Category: Party
 

Fired when a player invite you to party.

arg1 
team leader name


"PARTY_LEADER_CHANGED"
Category: Party
 

Fired when the player's leadership changed.

Referred to as buggy.

"PARTY_LFG_RESTRICTED"
Category: Party, Instance
 

?

Edit
"PARTY_LOOT_METHOD_CHANGED"
Category: Party,Loot
 

Fired when the party's loot method changes

Edit
"PARTY_MEMBERS_CHANGED"
Category: Party
 

REMOVED (5.0.4) - see: GROUP_ROSTER_UPDATE

Fired when the player's party changes.

As of 1.8.3 this event also fires when players are moved around in a Raid and when a player leaves the raid. This holds true even if the changes do not affect your party within the raid.

4-2-05 Edit: This event is called twice when the event PARTY_LOOT_METHOD_CHANGED is called.

7-28-05 EDIT: This event is generated when someone joins or leaves the group, also generated whenever someone rejects an invite and you're in a group. Also, if for instance you have 3 people in your group and you invite a 4th, it will generate 4 events. If you call GetNumPartyMembers() it will return 0, 1, 2, and 3. First event returing zero, 2nd event returning 1, etc etc.

Edit
"PARTY_MEMBER_DISABLE"
Category: Party
 

Fired when a specific party member is offline or dead

arg1 
Player Name


"PARTY_MEMBER_ENABLE"
Category: Party
 

Fired when a specific party member is still connected

arg1 
Player Name


Edit
"PETITION_CLOSED"
Category: Arena,Guild
 

Fired when a petition is closed, e.g. by you signing it. See PETITION_SHOW.

"PETITION_SHOW"
Category: Arena,Guild
 

Fired when you are shown a petition to create a guild or arena team. This can be due to someone offering you to sign it, or because of you clicking your own charter in your inventory. GetPetitionInfo() will tell you more.

"PETITION_VENDOR_CLOSED"
Category: Arena,Guild
 
"PETITION_VENDOR_SHOW"
Category: Arena,Guild
 
"PETITION_VENDOR_UPDATE"
Category: Arena,Guild
 


Edit
"PET_ATTACK_START"
Category: Combat,Pet
 

Fired when the player's pet begins attacking.


"PET_ATTACK_STOP"
Category: Combat,Pet
 

Fired when the player's pet ceases attack


Edit
"PET_BAR_HIDE"
Category: Pet,Action Bar
 

?

"PET_BAR_HIDEGRID"
Category: Pet,Action Bar
 

Fired when pet spells are dropped into the PetActionBar.


"PET_BAR_SHOWGRID"
Category: Pet, Action Bar
 

Fired when pet spells are dragged from the pet spellbook or the PetActionBar.

arg1
MouseButton used (e.g. "LeftButton","RightButton")
"PET_BAR_UPDATE"
Category: Pet, Action Bar
 

Fired when the pet bar is updates.

"PET_BAR_UPDATE_USABLE"
Category: Pet,ActionBar
 

?

Edit
"PET_BAR_UPDATE_COOLDOWN"
Category: Pet, Action Bar
 

Fired when a pet spell cooldown starts. It is not called when cooldown ends.

"PET_DISMISS_START"
Category: Pet
 

?

"PET_SPELL_POWER_UPDATE"
Category: Pet
 

Fires when the pet's spell power bonus changes. Use GetPetSpellBonusDamage() to retrieve the new value.

"PET_FORCE_NAME_DECLENSION"
Category: Pet
 

?

"PET_RENAMEABLE"
Category: Pet
 

?

"PET_STABLE_CLOSED"
Category: Pet
 


"PET_STABLE_SHOW"
Category: Pet
 


"PET_STABLE_UPDATE"
Category: Pet
 


Edit
"PET_STABLE_UPDATE_PAPERDOLL"
Category: Pet
 
"PET_TALENT_UPDATE"
Category: Pet
 

?

"PET_UI_CLOSE"
Category: Pet
 


"PET_UI_UPDATE"
Category: Pet
 
"PLAYER_DIFFICULTY_CHANGED"
Category: Raid
 

This event fires when the raid leader changes the difficulty of an instance.

"PLAYERBANKBAGSLOTS_CHANGED"
Category: Bank
 

This event only fires when bank bags slots are purchased. It no longer fires when bags in the slots are changed. Instead, when the bags are changed, PLAYERBANKSLOTS_CHANGED will fire, and arg1 will be NUM_BANKGENERIC_SLOTS + BagIndex.

Edit
"PLAYERBANKSLOTS_CHANGED"
Category: Bank
 

Fired when the One of the slots in the player's 24 bank slots has changed, or when any of the equipped bank bags have changed.

Does not fire when an item is added to or removed from a bank bag.

arg1 
When (arg1 <= NUM_BANKGENERIC_SLOTS), arg1 is the index of the generic bank slot that changed. When (arg1 > NUM_BANKGENERIC_SLOTS), (arg1 - NUM_BANKGENERIC_SLOTS) is the index of the equipped bank bag that changed.
"PLAYER_ALIVE"
Category: Death
 

Fired when the player:

  • Releases from death to a graveyard.
  • Accepts a resurrect before releasing their spirit.

Does not fire when the player is alive after being a ghost. PLAYER_UNGHOST is triggered in that case.


Edit
"PLAYER_AURAS_CHANGED"
Category: Buff
 

11/8/2008 This was removed with 3.02. Use UNIT_AURA instead.

Called when a buff or debuff is either applied to a unit or is removed from the player. (Further details to follow, study needed).

Also fired when you start eating and/or drinking (which really is only a buff being applied like any other).

Druid 
This event is also called when a Druid changes form (or prowl state). arg1 - arg9 are all nil in this case. These args are probably nil for other classes as well. Also, this event is called multiple times per form change.


"PLAYER_CAMPING"
Category: Player
 

Fired when the player is camping

Edit
"PLAYER_CONTROL_GAINED"
Category: Player,Combat
 

Fires after the PLAYER_CONTROL_LOST event, when control has been restored to the player.

"PLAYER_CONTROL_LOST"
Category: Player,Combat
 

Fires whenever the player is unable to control the character. Examples are when afflicted by fear, mind controlled, or when using a taxi.

Edit
"PLAYER_DAMAGE_DONE_MODS"
Category: Misc
 


"PLAYER_DEAD"
Category: Death
 

Fired when the player has died.

"PLAYER_DIFFICULTY_CHANGED"
Category: Player,Raid
 

?

"PLAYER_ENTERING_BATTLEGROUND"
Category: Player
 

?

"PLAYER_ENTERING_WORLD"
Category: System,Player,Instance
 

Fired when the player enters the world, enters/leaves an instance, or respawns at a graveyard. Also fires any other time the player sees a loading screen.

To check if the player is entering an instance, check [[API_IsInInstance|IsInInstance].

Correction on the above comment: When PLAYER_ENTERING_WORLD fires, you'll notice that WORLD_MAP_UPDATE fires just before it. My instincts tell that leaving an instance puts the player in void space momentarily. So for the case that you are entering AND leaving an instance, GetPlayerMapPosition always returns the coordinates [0,0] and hence there is no way to determine using the event PLAYER_ENTERING_WORLD if the player is entering an instance or not. When leaving an instance the following events fire (ignoring party/raid events).

WORLD_MAP_UPDATE
PLAYER_ENTERING_WORLD
WORLD_MAP_UPDATE <--- Player coordinates are non-zero here

Instances do have coordinates for units once the second WORLD_MAP_UPDATE event has fired. For the case of entering a battleground such as WSG, WORLD_MAP_UPDATE won't fire until you leave Silverwing Hold or Warsong Lumber Mill and you are outside. --Salanex

Edit
"PLAYER_ENTER_COMBAT"
Category: Combat
 

Fired when a player engages auto-attack. Note that firing a gun or a spell, or getting aggro, does NOT trigger this event.

From a post by Dhrago on the WoW forums:

PLAYER_ENTER_COMBAT and PLAYER_LEAVE_COMBAT are for *MELEE* combat only. They fire when you initiate autoattack and when you turn it off. However, any spell or ability that does not turn on autoattack does not trigger it. Nor does it trigger when you get aggro.
You probably want PLAYER_REGEN_DISABLED (happens when you get aggro) and PLAYER_REGEN_ENABLED (happens when you lose aggro).
"PLAYER_FARSIGHT_FOCUS_CHANGED"
Category: Player,Spell
 
"PLAYER_FLAGS_CHANGED"
Category: Player,Communication
 

This event fires when a Unit's flags change (eg: due to /afk, /dnd, etc.)

arg1 
The UnitId affected, eg: "player"
NOTE 
WoW appears to condense simultaneous flag changes into a single event. If you are currently AFK and not(DND) but you type /dnd you'll see two Chat Log messages ("You are no longer AFK" and "You are now DND: Do Not Disturb") but you'll only see a single PLAYER_FLAGS_CHANGED event.
"PLAYER_EQUIPMENT_CHANGED"
Category: Player
 

?

"PLAYER_FOCUS_CHANGED"
Category: Combat,Unit Info
 

This event is fired whenever the player's focus target (/focus) is changed, including when the focus target is lost or cleared.

Edit
"PLAYER_GAINS_VEHICLE_DATA"
Category: Player,Vehicle
 
"PLAYER_GUILD_UPDATE"
Category: Guild,Player
 

This appears to be fired when a player is gkicked, gquits, etc.

Reference handler in FriendsFrame.lua.


"PLAYER_LEAVE_COMBAT"
Category: Combat
 

Fired when the player leaves combat through death, defeat of opponents, or an ability. Does not fire if a player flees from combat on foot.


"PLAYER_LEAVING_WORLD"
Category: System
 

Fired when a player logs out and possibly at other situations as well


Edit
"PLAYER_LEVEL_UP"
Category: Player
 

Fired when a player levels up.

arg1 
New player level. Note that UnitLevel("player") will most likely return an incorrect value when called in this event handler or shortly after, so use this value.
arg2 
Hit points gained from leveling.
arg3 
Mana points gained from leveling.
arg4 
Talent points gained from leveling. Should always be 1 unless the player is between levels 1 to 9.
arg5 - arg9 
Attribute score increases from leveling. Strength (5) / Agility (6) / Stamina (7) / Intellect (8) / Spirit (9).


Edit
"PLAYER_LOGIN"
Category: System
 

Triggered immediately before PLAYER_ENTERING_WORLD on login and UI Reload, but NOT when entering/leaving instances.

Note: Player skills such as those available through GetNumSkillLines() and relatives does not appear to be available when this event or PLAYER_ENTERING_WORLD fires during an actual player login from character-selection, as all the GetNumSkillLines()-function returns is 0 in those cases. When these events trigger from other reasons, such as zoning, the skill-related functions appear to work normally.


"PLAYER_LOGOUT"
Category: System
 

Sent when the player logs out or the UI is reloaded, just before SavedVariables are saved. The event fires after PLAYER_LEAVING_WORLD.

"PLAYER_LOSES_VEHICLE_DATA"
Category: Player,Vehicle
 

?

"PLAYER_MONEY"
Category: Player
 

Fired whenever the player gains or loses money.

To get the amount of money earned/lost, you'll need to save the return value from GetMoney() from the last time PLAYER_MONEY fired and compare it to the new return value from GetMoney().
Example
"PLAYER_PVP_KILLS_CHANGED"
Category: Player,Honor
 

Fired when you slay another player


"PLAYER_PVP_RANK_CHANGED"
Category: Honor
 
"PLAYER_QUITING"
Category: System
 

Fired when the player tries to quit, as opposed to logout, while outside an inn. This event does not indicate that the "player has quit", but instead that the "player has the quitting option".

The dialog which appears after this event, has choices of "Exit Now" or "Cancel". The dialog which appears when you try to logout outside an inn, only has a "Cancel" choice, and the event is not fired.

"PLAYER_ROLES_ASSIGNED"
Category: Instance
 

?

Edit
"PLAYER_REGEN_DISABLED"
Category: Player,Combat
 

Fired whenever you enter combat, as normal regen rates are disabled during combat. This means that either you are in the hate list of a NPC or that you've been taking part in a pvp action (either as attacker or victim).


"PLAYER_REGEN_ENABLED"
Category: Player,Combat
 

Fired after ending combat, as regen rates return to normal. Useful for determining when a player has left combat. This occurs when you are not on the hate list of any NPC, or a few seconds after the latest pvp attack that you were involved with.


"PLAYER_SKINNED"
Category: Player,Battleground
 

Fired when the player's insignia is removed in a Battleground.


Edit
"PLAYER_TALENT_UPDATE"
Category: Player
 

Fired when the player changes between dual talent specs, and possibly when learning or unlearning talents (?).

"PLAYER_TARGET_CHANGED"
Category: Combat,Unit Info
 

This event is fired whenever the player's target is changed, including when the target is lost.

arg1 
up if you click the target directly, down if you press Escape to clear the target selection, LeftButton if you select the target using static frames in the UI, nil if the target moves out of range and is lost.
"PLAYER_TOTEM_UPDATE"
Category: Player
 

This event fires whenever a totem is dropped (cast) or destroyed (either recalled or killed).

arg1 
The number of the totem slot (1-4) affected by the update. See for example GetTotemInfo() for the uses of the totem slot number.
"PLAYER_TRADE_MONEY"
Category: Trade
 

Fired when the player trades money


Edit
"PLAYER_UNGHOST"
Category: Death
 

Fired when the player is alive after being a ghost. Called after one of:

  • Performing a successful corpse run and the player accepts the 'Resurrect Now' box.
  • Accepting a resurrect from another player after releasing from a death.
  • Zoning into an instance where the player is dead.
  • When the player accept a resurrect from a Spirit Healer.

The player is alive when this event happens. Does not fire when the player is resurrected before releasing. PLAYER_ALIVE is triggered in that case.


"PLAYER_UPDATE_RESTING"
Category: Player
 

Fired when the player starts or stops resting, i.e. when entering/leaving inns/major towns.


Edit
"PLAYER_XP_UPDATE"
Category: Player
 

Fired when the player's XP is updated (due quest completion or killing).

arg1 
The UnitId affected, eg: "player"


"PLAYERBANKBAGSLOTS_CHANGED"
Category: Bank
 


"PLAYERBANKSLOTS_CHANGED"
Category: Bank
 


"PLAYTIME_CHANGED"
Category: Player
 

Fired when the playtime state changes.

"PLAY_MOVIE"
Category: Misc
 
arg1 
File name (without extension) & path, eg: "INTERFACE\CINEMATICS\WOW_FOTLK_1024"
arg2 
Sound volume (0-150)
"PREVIEW_PET_TALENT_POINTS_CHANGED"
Category: Pet
 

?

"PREVIEW_TALENT_POINTS_CHANGED"
Category: Player
 

?

"PVPQUEUE_ANYWHERE_SHOW"
Category: Battleground
 

?

"PVPQUEUE_ANYWHERE_UPDATE_AVAILABLE"
Category: Battleground
 

?

Around Wikia's network

Random Wiki