Quantcast
Best way to identify that player joined a team? - WoWInterface
Thread Tools Display Modes
11-21-10, 11:57 AM   #1
Virance
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 12
Best way to identify that player joined a team?

I'm looking through the events and I don't really see anything like "PLAYER_JOINED_TEAM" or something along those lines.

My initial reaction is to just keep a bool called inTeam or something, and every time PARTY_MEMBERS_CHANGED gets called update that variable (and if it changes, do whatever I need to do when the player first joins a team).

Any thoughts? Is there a better way that doesn't involve hooking a function that fires so frequently?

Thanks in advance!
  Reply With Quote
11-21-10, 12:14 PM   #2
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
By Team do you mean PvP Team, Group, Raid or both Group and Raid?
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.
  Reply With Quote
11-21-10, 01:01 PM   #3
Virance
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 12
Either a PvE party or a PvE raid. I think I'm going to stick with the PLAYER_JOINED_TEAM solution, since I actually need to run that anyway - forgot about a planned feature that needs it

Sorry!
  Reply With Quote
11-21-10, 01:38 PM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,257
PARTY_MEMBERS_CHANGED is the one you want.

It fires in all the situations you need (and a few you don't).
  Reply With Quote
11-22-10, 08:38 AM   #5
Virance
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 12
Originally Posted by Dridzt View Post
PARTY_MEMBERS_CHANGED is the one you want.

It fires in all the situations you need (and a few you don't).

Hehe, yea - that's the one. There is no PLAYER_JOINED_TEAM.

It actually worked out really well, and I finally got PugLax adding/removing people as they join/leave without requiring a full reset over the weekend.

Thanks again for the help folks!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Best way to identify that player joined a team?

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