WoW:API UnitIsGroupLeader: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with "{{wowapi}} __NOTOC__ Returns true if the unit is leader party or raid group, false otherwise. isTrue = UnitIsGroupLeader("arg1"[, groupType]) == Parameters == === Argument...")
 
m (Move page script moved page API UnitIsGroupLeader to API UnitIsGroupLeader without leaving a redirect)
 
(No difference)

Latest revision as of 04:47, 15 August 2023

WoW API < UnitIsGroupLeader

Returns true if the unit is leader party or raid group, false otherwise.

isTrue = UnitIsGroupLeader("unit"[, groupType])

Arguments[edit]

unit
(unitId) Unit that should be checked
groupType (optional)
(partyCategoryType) The type of group.
  • LE_PARTY_CATEGORY_HOME - get the count for a local or manual group. (default)
  • LE_PARTY_CATEGORY_INSTANCE - get the count for a player's automatic group. (default in an instance)

Returns[edit]

isTrue
(boolean) true or false

Examples[edit]

Call

local targetIsLeader = UnitIsGroupLeader("target")

Result

targetIsLeader == true  - If your target is the leader of their group
targetIsLeader == false - If your target is not the leader of their group

Notes[edit]

  • Seems to work on players outside of their group.
  • As of 5.0.4, passing an unknown unitName, will cause UnitIsGroupLeader to return the name, which may be a bug.

See[edit]