benilla-re systems structs docs

s_spellRangeScale

global · spell

Address
0x8118d4 · 4 bytes, up to 0x8118d7
Type
const float
Meaning
Holds 100.0, which GetMinMaxRange loads and a spell file initializer squares
Confidence
verified, proof one
Finding
spell/records#range

Finding: Range in spell: records

GetMinMaxRange(caster, spellId, &min, &max, target) zeroes both and returns for a null caster or no record, or with max = 100.0 for +0x18 & 0x404. target is a unit when its type has bit 3. With R(u) a unit's float at unit field +0x1f0: a SpellRange row (+0x90) with flag bit 0 sets min = 0 and max = S if S = R(t) + R(caster) + 4/3 > 5.0, else 5.0, t being the unit target, else the unit whose guid is at caster +0xc48, else the caster. Another row copies its +0x04 and +0x08; a target of type bit 3 or 7 adds R(caster) + R(unit target, else caster) to max, and to min unless min == 0.

The derivation is in the doc.