benilla-re systems structs docs

SpellCanTargetObject

function · spell · primitive

Address
0x6e6460 · 939 bytes, up to 0x6e680a
Signature
uint8_t __fastcall (const uint64_t *guid, uint8_t checkRange)
Meaning
Returns whether an object would bind to the flag word and, with checkRange, is within the spell's range
Confidence
verified, proof one
Finding
spell/targeting#testing-an-object-without-binding
Test
spell::spell_objs_dist_sq_difftest

Finding: Testing an object without binding in spell: targeting

0x6e6460 answers whether the object with the guid at ecx would bind, writing nothing. It runs the binder's gates and arms with three differences: it has no zero-word and no 0x494a50 gate, its game-object arm also requires 0x5f8260, and every passing arm, items and game objects included, ends in a range test when dl is nonzero. That test returns 1 exactly when min² ≤ d ≤ max², where d is the squared distance rounded to a float; a NaN anywhere fails. Both callers pass dl 1: the world hover, which shows cursor 2 (Cast) on 1 and 0x16 (UnableCast) on 0, and SpellCanTargetUnit.

The derivation is in the doc.

Callers 2

Callees 9

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