benilla-re systems structs docs

BindSpellTargetObject

function · spell · primitive

Address
0x6e5b40 · 1445 bytes, up to 0x6e60e4
Signature
uint8_t __thiscall (void *this)
Meaning
Binds a clicked object to the flag word, range-tests a unit or corpse, and sends the cast when the word empties
Confidence
verified, proof one
Finding
spell/targeting#binding-a-clicked-object

Finding: Binding a clicked object in spell: targeting

0x6e5b40 binds the object in ecx to the flag word and returns 1 when it bound. Each exit below returns 0 with no write and no message, in this order; the unit arms then run in the order 0x8, 0x4, 0x100, 0x80, 0x2, 0x8000, 0x200, and the first to bind wins. Items, game objects and corpses take the arms of the flag word's table; a corpse is tried for 0x8000 and then 0x200, each requiring corpse flag 0x1 clear. A miss of every arm is silent too.

exitwhen
0x6e5b5e, 0x6e5b67the object is null; the word is 0
0x6e5b93the caster guid at +0x08 resolves to no unit
0x6e5ba50x494a50(2) returns 0
0x6e5bd2the spell id at +0x10 has no record
0x6e5bf7the object is the caster and AttributesEx has 0x80000
0x6e5c1da unit with unit-flag 0x10000
0x6e5c53a unit outside a nonzero TargetCreatureType mask
0x6e5c8ba dead unit (health ≤ 0) with dynamic flag 0x20 clear, no 0x8600 in the word, AttributesEx2 bit 0 clear
0x6e5ca2a live unit while the word has 0x400

The derivation is in the doc.

Callers 7

Callees 12

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