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.
This commit is contained in:
Kelsi
2026-05-15 01:54:16 -07:00
parent 8b4c67bab6
commit bd5e9aa2c2
4 changed files with 4 additions and 0 deletions

View File

@@ -188,6 +188,7 @@
"Path": 1
},
"SpellRange": {
"MinRange": 1,
"MaxRange": 2
},
"SpellVisual": {

View File

@@ -231,6 +231,7 @@
"Name": 8
},
"SpellRange": {
"MinRange": 2,
"MaxRange": 4
},
"SpellVisual": {

View File

@@ -225,6 +225,7 @@
"Name": 8
},
"SpellRange": {
"MinRange": 1,
"MaxRange": 2
},
"SpellVisual": {

View File

@@ -247,6 +247,7 @@
"Name": 8
},
"SpellRange": {
"MinRange": 2,
"MaxRange": 4
},
"SpellVisual": {