API UnitFactionGroup

104,546pages on
this wiki
Add New Page
Add New Page Talk0
WoW API < UnitFactionGroup

Get the name of the faction (Horde/Alliance) a unit belongs to.

englishFaction, localizedFaction = UnitFactionGroup(unit)

Arguments Edit

String - UnitID you want to get the faction for

Returns Edit

String - Unit's faction name in English, i.e. "Alliance", "Horde" or nil.
String - Unit's faction name in the client's locale or nil.

Details Edit

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 nil,nil.

Also on Fandom

Random Wiki