Script::UnitFactionGroup
function · ui · primitive
- Address
0x516630· 429 bytes, up to0x5167dc- Signature
int __fastcall (lua_State *L)- Meaning
- Returns the faction group token and name of a unit
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitverbs#faction-and-reaction
Finding: Faction and reaction in ui: time, console and the remaining unit functions
UnitFactionGroup(unit) returns the group token and its localized name for the first faction group whose mask the unit's faction template contains,
and nil, nil when none. The template comes from the unit's +0x74 field, a corpse's race template, or, for a player token with no object, the race
in the name cache. UnitReaction(a, b) is ui/unittokens. UnitIsEnemy(a, b) returns 1 when both resolve and UnitReaction is 1 or less, else nil;
UnitCanAssist(a, b) returns 1 when both resolve and CanAssist_Unit allows it.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 9
- ClntObjMgrObjectPtr objectlayer
- Script::GetGUIDFromName ui
- DBCache::NameCache::GetRecord dbcache
- CGCorpse_C::GetRaceTemplate objectlayer
- lua_isstring lua
- lua_tostring lua
- lua_pushnil lua
- lua_pushstring lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.