Lore archive · Warcraft Wiki, 2023 dump
API UnitFactionGroup
Last wiki revision 2023-09-02
Returns the faction (Horde/Alliance) a unit belongs to. englishFaction, localizedFaction = UnitFactionGroup(unit)
- unit: : UnitId
- englishFaction: - Unit's faction name in English, i.e. "Alliance", "Horde", "Neutral" or nil.
- localizedFaction: - Unit's faction name in the client's locale or nil.
- The function returns may not return correct results until after PLAYER_ENTERING_WORLD event for units other than "player".
- Note that for NPCs, the function will only return Alliance/Horde for factions closely allied with either side. Goblins, for instance, return.
- Pandaren player characters on the Wandering Isle return "Neutral", "".
Source
https://warcraft.wiki.gg/wiki/API_UnitFactionGroup · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.