Script::UnitPlayerControlled
function · ui · primitive
- Address
0x516410· 79 bytes, up to0x51645e- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes 1 when UNIT_FIELD_FLAGS bit 3 is set, else nil
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitinfo#flag-predicates
Finding: Flag predicates in ui: unit presence, flags, classification and type
Four predicates read one word of the unit's fields and push 1 or nil. They take no Usage: check and answer nil for a unit that does not resolve to a held unit object.
| function | test |
|---|---|
UnitPlayerControlled | UNIT_FIELD_FLAGS (+0xa0) bit 3 |
UnitIsPlusMob | UNIT_FIELD_FLAGS bit 6 |
UnitIsCharmed | UNIT_FIELD_CHARMEDBY (+0x10, +0x14) nonzero |
UnitIsCivilian | 0x612550 (below) |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 4
- GetUnitFromToken ui
- lua_tostring lua
- lua_pushnil lua
- lua_pushnumber lua
Calls and jumps by a bare address, from tables/calls.tsv.