Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API UnitFactionGroup
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} Get the name of the faction (Horde/Alliance) a unit belongs to. englishFaction, localizedFaction = UnitFactionGroup(unit) == Arguments == ; unit : String - [[API_TYPE_UnitId|UnitID]] you want to get the faction for == Returns == ;englishFaction : String - Unit's faction name in English, i.e. "Alliance", "Horde" or nil. ;localizedFaction : String - Unit's faction name in the client's locale or nil. == Details == The functon returns correct results after the PLAYER_ENTERING_WORLD event. Note that for NPCs, the function will only return Alliance/Horde for factions closely allied with either side. Goblins, for instance, return <tt>nil,nil</tt>.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)