View Single Post
08-15-06, 12:43 PM   #4
ckknight
A Warpwood Thunder Caller
 
ckknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 90
Fun facts:

UnitFactionGroup("player") is available only after PLAYER_LOGIN, whereas
UnitRace("player") is always available.

So if you need to check your own faction at the beginning, you'd have to check:

local _,race = UnitRace("player")
local faction = (race == "TAUREN" or race == "ORC" or race == "TROLL" or race == "SCOURGE") and FACTION_HORDE or FACTION_ALLIANCE
  Reply With Quote