benilla-re systems structs docs

Script::SpellCanTargetUnit

function · spell · orchestration

Address
0x6e6d00 · 130 bytes, up to 0x6e6d81
Signature
int __fastcall (lua_State *L)
Meaning
Returns 1 to Lua when a unit token passes 0x6e6460 with range, else nil
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 7

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