WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Best way to identify that player joined a team? (https://www.wowinterface.com/forums/showthread.php?t=36917)

Virance 11-21-10 11:57 AM

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!

v6o 11-21-10 12:14 PM

By Team do you mean PvP Team, Group, Raid or both Group and Raid?

Virance 11-21-10 01:01 PM

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!

Dridzt 11-21-10 01:38 PM

PARTY_MEMBERS_CHANGED is the one you want.

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

Virance 11-22-10 08:38 AM

Quote:

Originally Posted by Dridzt (Post 218934)
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!


All times are GMT -6. The time now is 09:24 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI