Files
WoWee/Data
Kelsi bd5e9aa2c2 fix(dbc): add SpellRange.MinRange to all expansion layouts
application.cpp:438 queries SpellRange.MinRange to populate the
spell-range map used by minimum-distance casting checks. None of the
four dbc_layouts.json files defined MinRange, so the lookup returned
the DBC_FIELD_INVALID sentinel (0xFFFFFFFF); rDbc->getFloat(i, 0xFFFFFFFF)
then read out of bounds and returned 0. Minimum-range checks were
silently dead on every expansion.

Canonical SpellRange.dbc layouts (per spellbook_screen.cpp:71-74):

  Classic 1.12:  0=ID, 1=MinRange,       2=MaxRange
  TBC / WotLK:   0=ID, 1=MinRangeFriendly, 2=MinRangeHostile,
                       3=MaxRangeFriendly, 4=MaxRangeHostile

The existing MaxRange values (classic 2, TBC/WotLK 4) follow the
'Hostile' convention; MinRange is wired the same way (1 for Vanilla,
2 for TBC/WotLK).

Visible effect: spells with a non-zero minimum range (hunter ranged
abilities, Pyroblast, etc.) will now correctly trigger 'You are too
close' errors and target-validity checks at the client level.
2026-05-15 01:54:16 -07:00
..