benilla-re systems structs docs

s_rangeMaskJumpTable

global · spell

Address
0x6e4748 · 40 bytes, up to 0x6e476f
Type
void *[10]
Meaning
Holds the ten case addresses of the range pre-check 0x6e4440's implicit-target switch
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.