benilla-re systems structs docs

Script::SpellTargetUnit

function · spell · primitive

Address
0x6e6d90 · 156 bytes, up to 0x6e6e2b
Signature
int __fastcall (lua_State *L)
Meaning
Binds a unit token through 0x6e5b10 while targeting, or raises reason 0x59 when it names no unit
Confidence
verified, proof one
Name from
the community database (idb)
Finding
spell/targeting#lua-targeting-functions

Finding: Lua targeting functions in spell: targeting

Five Lua functions sit in the luaL_reg table 0x86f950, which 0x6e6ef0 registers and 0x6e6f10 unregisters. SpellIsTargeting returns 1 or nil. SpellCanTargetUnit("unit") returns 1 when 0x6e6460 passes for the token's guid with range, else nil; it has no other gate. SpellTargetUnit("unit") returns nothing: silent unless 0x494a50(2) passes and targeting is on; a token naming no unit raises reason 0x59 through 0x6e1a00; otherwise it binds through 0x6e5b10. SpellStopTargeting stops targeting through 0x6e4900 and returns 1 if it was on, else nil. SpellStopCasting cancels auto-repeat, else aborts an in-flight cast with 0x1c, returning 1, else nil. A missing string raises the usage error.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 8

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