Thread Tools Display Modes
01-28-07, 11:11 AM   #1
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
[api]

Hello,

I would like my addon to react when player joins a *party* (not a raid). I looked thru events list and only found " CHAT_MSG_SYSTEM" with arg "ERR_RAID_YOU_JOINED" (You have joined a raid group).
Does anyone know how to react to such event?

Thanks in advance!
  Reply With Quote
01-28-07, 12:05 PM   #2
JoshBorke
A Chromatic Dragonspawn
 
JoshBorke's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 185
PARTY_MEMBERS_CHANGED

check for UnitExists('party1') and not UnitExists('raid1') or something like that
  Reply With Quote
01-28-07, 12:16 PM   #3
Saiiyna
An Aku'mai Servant
 
Saiiyna's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 33
Originally Posted by Zax
Hello,

I would like my addon to react when player joins a *party* (not a raid). I looked thru events list and only found " CHAT_MSG_SYSTEM" with arg "ERR_RAID_YOU_JOINED" (You have joined a raid group).
Does anyone know how to react to such event?

Thanks in advance!
addon_OnLoad()
this:RegisterEvent( "PARTY_MEMBERS_CHANGED");
.
.
.
end

addon_OnEvent(event)

if event == "PARTY_MEMBERS_CHANGED" then
do stuff
end
.
.
.
end
  Reply With Quote
01-29-07, 01:54 AM   #4
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Found in WowWiki:
"PARTY_MEMBERS_CHANGED"
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 whenever someone rejects an invite and your in a group, also generated obviously when someone joins or leaves the 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
So I'm not sure I will be able to maange this event.

Thanks anyway.

Last edited by Zax : 01-29-07 at 03:53 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » [api]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off