Fandom

WoWWiki

API UnitInParty

105,019pages on
this wiki
Add New Page
Talk0 Share
WoW API < UnitInParty

Returns 1 if the unit is in your party, nil otherwise.

isTrue = UnitInParty("arg1")

Parameters Edit

Arguments Edit

arg1 
String - Unit who should be checked such as target, focus, party1, etc.

Returns Edit

isTrue 
1 or nil

Example Edit

local TargetInParty = UnitInParty("target")

ResultEdit

TargetInParty = 1   - If your target is in your party
TargetInParty = nil - If your target is not in your party

DetailsEdit

Pets are not considered to be part of your party.
The "battleground"-raid/party-members are also not considered to be part of your party.
UnitInParty("player") should return false. (since patch 1.11.2, always returned 1 before) Use GetNumPartyMembers() instead.
Bug: As of 1.11.2(5464), this function returns nil for UnitInParty("player"), possibly due to the function being defined both as a C and LUA function for reasons unknown.
Observed in 2.0.3: UnitInParty("player") always returns true. Even when you are not in a party. Assumed reason being: you are always in your own party (of at least one, yourself.)

See alsoEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.