WoW API < UnitPlayerOrPetInParty

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

isTrue = UnitPlayerOrPetInParty("unit")

Parameters[edit | edit source]

Arguments[edit | edit source]

String - unitId who should be checked

Returns[edit | edit source]

1 or nil

Note: returns nil for player and pet as of 3.0.2

Example[edit | edit source]

local TargetInParty = UnitPlayerOrPetInParty("target")

Result[edit | edit source]

TargetInParty = 1   - If your target is in your party
TargetInParty = nil - If your target is not in party
Community content is available under CC-BY-SA unless otherwise noted.