benilla-re systems structs docs

Script::UnitIsPartyLeader

function · ui · orchestration

Address
0x516210 · 123 bytes, up to 0x51628a
Signature
int __fastcall (lua_State *L)
Meaning
Pushes 1 for a unit that is a group leader by its player flag or the leader GUID, else nil
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/party#unitispartyleader

Finding: UnitIsPartyLeader in ui: the party, its leader and its members' records

UnitIsPartyLeader(unit) has no usage check. It resolves the token, then answers 1 when the unit's player object (type mask 0x10) has PLAYER_FLAGS bit 0x1 set, or when the token's GUID equals the leader cell; else nil. One value on both returning paths, and the number 1, never a boolean. A token no prefix matches raises Unknown unit name: %s (unittokens#the-unit-token); a missing or non-string argument gives GUID 0, so with no group, where the cell is 0 too, it answers 1.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 5

Calls and jumps by a bare address, from tables/calls.tsv.