WoW:API UnitPlayerOrPetInParty: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
(arg1 -> unitId)
Line 5: Line 5:


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
  isTrue = UnitPlayerOrPetInParty("arg1")
  isTrue = UnitPlayerOrPetInParty("unit")


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
<!-- List each argument, together with its type -->
<!-- List each argument, together with its type -->
:;arg1 : String - Unit who should be checked
:;"unit" : String - [[unitId]] who should be checked


=== Returns ===
=== Returns ===
Line 22: Line 22:
====Result====
====Result====
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->
  TargetInParty = 1  - If your target is in your raid group.
  TargetInParty = 1  - If your target is in your party
  TargetInParty = nil - If your target is not in raid group.
  TargetInParty = nil - If your target is not in party

Revision as of 11:59, 28 August 2006

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

Example

local TargetInParty = UnitPlayerOrPetInParty("target")

Result

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