WoW:API UnitFactionGroup: Difference between revisions

Updated info to be accurate.
No edit summary
(Updated info to be accurate.)
Line 1: Line 1:
UnitFactionGroup("player") returns the faction of the currently logged in character (Horde or Alliance).
Get the [[API_TYPE_UnitId|UnitID]] faction
UnitFactionGroup("player") returns nil before PLAYER_ENTERING_WORLD and after/during PLAYER_LEAVING_WORLD event.
UnitFactionGroup("target") returns the faction group the current target or nil if there is no current target.


UnitFactionGroup("unitid");
== Parameters ==
=== Arguments ===
:[[API_TYPE_UnitId|UnitID]]
:; [[API_TYPE_UnitId|UnitID]] : String - Unit ID you want to get the faction for
----
=== Returns ===
:englishFaction, localizedFaction
:;englishFaction : String - Faction name of the [[API_TYPE_UnitId|UnitID]] in English.
:;localizedFaction : String - Localized version of the faction name.
----
=== Details ===
Used to retrieve the [[API_TYPE_UnitId|UnitID]] faction ([[Horde]] or [[Alliance]]), this can be called at PLAYER_ENTERING_WORLD with a player [[API_TYPE_UnitId|UnitID]].


----
----
{{WoW API}}
__NOTOC__
{{wowapi}}
Anonymous user