WoW:API UnitInParty: Difference between revisions

m
Move page script moved page API UnitInParty to WoW:API UnitInParty without leaving a redirect
mNo edit summary
m (Move page script moved page API UnitInParty to WoW:API UnitInParty without leaving a redirect)
 
(10 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Returns 1 if the unit is in your party.  UnitInParty("player") always returns true.
{{wowapi}} __NOTOC__


[[Category:API Functions|UnitInParty]]
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
[[Category:API Unit Functions|UnitInParty]]
Returns 1 if the unit is in your party, nil otherwise.
[[Category:API Group Functions|UnitInParty]]
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
isTrue = UnitInParty("arg1")
 
== Parameters ==
=== Arguments ===
<!-- List each argument, together with its type -->
:;arg1 : String - Unit who should be checked such as target, focus, party1, etc.
 
=== Returns ===
<!-- List each return value, together with its type -->
:;isTrue : 1 or nil
 
== Example ==
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
local TargetInParty = UnitInParty("target")
 
====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. -->
TargetInParty = 1  - If your target is in your party
TargetInParty = nil - If your target is not in your party
 
==Details==
<!-- Details not appropriate for the main description can go here.
    REMOVE the section if you're just going to restate the intro line! -->
 
 
: 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 [[API_GetNumPartyMembers|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 also==
* [[API UnitInRaid]]
Anonymous user