benilla-re systems structs docs

Script::UnitReaction

function · ui · primitive

Address
0x5167e0 · 164 bytes, up to 0x516883
Signature
int __fastcall (lua_State *L)
Meaning
Returns the reaction of one unit towards another plus 1
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/unittokens#what-the-functions-push

Finding: What the functions push in ui: unit tokens and the unit functions' arguments

The predicates push the number 1 (the double 0x3ff0000000000000, from push 0x3ff00000; push 0) for true and nil for false, one value each. No unit function pushes a Lua boolean: lua_pushboolean is 0x6f39f0 and has 7 callers, none inside the 83 unit functions or anything they call; IsPetAttackActive is the one game function that pushes a boolean, and rawequal, pcall and xpcall the library ones. The numeric getters push the number 0 for a unit that resolves to nothing, and the string getters nil. UnitReaction pushes the engine's rating plus 1, nil when either token fails to resolve, never 0.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 7

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