benilla-re systems structs docs

Script::UnitIsCharmed

function · ui · primitive

Address
0x516cf0 · 73 bytes, up to 0x516d38
Signature
int __fastcall (lua_State *L)
Meaning
Pushes 1 when UNIT_FIELD_CHARMEDBY is nonzero, 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.

functiontest
UnitPlayerControlledUNIT_FIELD_FLAGS (+0xa0) bit 3
UnitIsPlusMobUNIT_FIELD_FLAGS bit 6
UnitIsCharmedUNIT_FIELD_CHARMEDBY (+0x10, +0x14) nonzero
UnitIsCivilian0x612550 (below)

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 4

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