mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-06-09 00:24:42 -04:00
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.