Mikk38024@legacy41558003 (talk | contribs) No edit summary |
({{wowapi}}, format) |
||
Line 1: | Line 1: | ||
+ | {{wowapi}} __NOTOC__ |
||
− | <center>'''GetPartyMember'''</center> |
||
⚫ | |||
− | |||
memberUnitId = GetPartyMember(index); |
memberUnitId = GetPartyMember(index); |
||
+ | ==Parameters== |
||
⚫ | |||
⚫ | |||
− | |||
− | ---- |
||
⚫ | |||
− | |||
− | :(index) |
||
:;index : Number - Which party member to query (1-4) |
:;index : Number - Which party member to query (1-4) |
||
⚫ | |||
− | |||
− | ---- |
||
⚫ | |||
− | |||
− | :memberUnitId |
||
:;memberUnitId : Number - If the specified party member exists, returns the id of that member, otherwise returns <tt>nil</tt> |
:;memberUnitId : Number - If the specified party member exists, returns the id of that member, otherwise returns <tt>nil</tt> |
||
⚫ | |||
⚫ | The numbers always translate directly; querying for 1 will return "party1", 2 "party2", etc, as long as that party slot is filled. This is mostly useful for testing for whether the party member in question exists. Though a more straightforward method of accomplishing that is, of course, simply calling [[API GetNumPartyMembers|GetNumPartyMembers()]]. |
||
⚫ | |||
− | |||
⚫ | |||
− | ---- |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
− | <!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> |
||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
⚫ | |||
− | + | ===Result=== |
|
⚫ | |||
+ | ==Notes== |
||
⚫ | |||
⚫ | The numbers always translate directly; querying for 1 will return "party1", 2 "party2", etc, as long as that party slot is filled. This is mostly useful for testing for whether the party member in question exists. Though a more straightforward method of accomplishing that is, of course, simply calling [[API GetNumPartyMembers|GetNumPartyMembers()]]. |
||
− | |||
− | ---- |
||
− | {{Template:WoW API}} |
Revision as of 22:28, 23 December 2006
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the unit Id of the specified party member if that party member exists, or nil otherwise.
memberUnitId = GetPartyMember(index);
Parameters
Arguments
- index
- Number - Which party member to query (1-4)
Returns
- memberUnitId
- Number - If the specified party member exists, returns the id of that member, otherwise returns nil
Example
memberCount = 0 for groupindex = 1,MAX_PARTY_MEMBERS do if (GetPartyMember(groupindex)) then memberCount = memberCount + 1 end end
Result
Will count the number of members in the party (not the best way to do that but it's a reasonable example).
Notes
The numbers always translate directly; querying for 1 will return "party1", 2 "party2", etc, as long as that party slot is filled. This is mostly useful for testing for whether the party member in question exists. Though a more straightforward method of accomplishing that is, of course, simply calling GetNumPartyMembers().