SpellRangeRec
struct · dbc · 88 bytes
- Meaning
- Holds one SpellRange.dbc row: id, minimum and maximum range, flags and names
- Confidence
- inferred
- 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.
Fields 3
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0004 | 4 | float | m_rangeMin | Holds the minimum range, copied when flag bit 0 is clear | verified, proof one | spell/records#range |
0x0008 | 4 | float | m_rangeMax | Holds the maximum range, copied when flag bit 0 is clear | verified, proof one | spell/records#range |
0x000c | 4 | uint32_t | m_flags | Holds flags; bit 0 selects the reach-based range | verified, proof one | spell/records#range |