benilla-re systems structs docs

Script::UnitAffectingCombat

function · ui · primitive

Address
0x517e10 · 113 bytes, up to 0x517e80
Signature
int __fastcall (lua_State *L)
Meaning
Returns 1 when the unit's UNIT_FIELD_FLAGS has bit 19 set, else nil
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/bindings#unit-combat-flag

Finding: Unit combat flag in ui: standalone bindings

UnitAffectingCombat(unit) is 0x517e10. A first argument that is neither string nor number raises Usage: UnitAffectingCombat("unit"). The unit token resolves through 0x515940; an unresolved token returns nil, exactly as a unit that is not in combat does. Otherwise it returns the number 1 when bit 19 (0x80000) of UNIT_FIELD_FLAGS is set and nil when it is clear. The player's own flags are read the same way as any other unit's, by the same token resolution.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 6

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