WoW API: UnitPlayerOrPetInParty

Revision as of 04:47, 15 August 2023 by Move page script (talk) (Move page script moved page API UnitPlayerOrPetInParty to API UnitPlayerOrPetInParty without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW API < UnitPlayerOrPetInParty

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

isTrue = UnitPlayerOrPetInParty("unit")

Parameters

Arguments

"unit"
String - unitId who should be checked

Returns

isTrue
1 or nil

Note: returns nil for player and pet as of 3.0.2

Example

local TargetInParty = UnitPlayerOrPetInParty("target")

Result

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