benilla-re systems structs docs

CheckSpellTargetRange

function · spell · primitive

Address
0x6e4440 · 775 bytes, up to 0x6e4746
Signature
uint8_t __fastcall (void *caster, const void *rec, uint64_t guid, uint8_t report)
Meaning
Refuses a target a relation admits when it is out of range (0x59) or too close (0x76)
Confidence
verified, proof one
Finding
spell/checks#range-pre-check

Finding: Range pre-check in spell: checks

0x6e4440(caster, rec, guid, report) returns 0 only when a relation admits the target and the range compare fails. The target is guid's object, 0xb4e2d8's for 0; none returns 1. A mask starts from Targets's low word; each effect's first implicit target edits it: 1 clears 0x400, 5 clears 0x8000, 6 and 53 set 0x80, 21 and 45 set 0x100, 23 sets 0x800, 25 and 63 set 2, 26 sets 0x4000, 35 sets 8, 57 and 61 set 4. Mask 0x4800 admits a game object; a corpse without CORPSE_FIELD_FLAGS & 1 is admitted by 0x8000 when 0x6067d0 holds, by 0x200 when it fails. Units: next entry. The report is 0x59 SPELL_FAILED_OUT_OF_RANGE beyond the maximum, else 0x76 SPELL_FAILED_TOO_CLOSE, with (−1, −1, 0).

The derivation is in the doc.

Callers 2

Callees 9

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