WoW:API UnitPlayerOrPetInParty: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(arg1 -> unitId)
m (Move page script moved page API UnitPlayerOrPetInParty to API UnitPlayerOrPetInParty without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
<!-- List each return value, together with its type -->
<!-- List each return value, together with its type -->
:;isTrue : 1 or nil
:;isTrue : 1 or nil
Note: returns nil for player and pet as of 3.0.2


== Example ==
== Example ==

Latest revision as of 04:47, 15 August 2023

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