mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
fix: expansion-aware SpellRange.dbc loading and Classic spell tooltip fields
SpellRange.dbc layout fix: - Classic 1.12 uses field 2 (MaxRange), TBC/WotLK use field 4 (MaxRangeHostile) - Add SpellRange layout to each expansion's dbc_layouts.json - Replace hardcoded field 5 with layout-driven lookup in SpellRange loading - Corrects previously wrong range values in WotLK spellbook tooltips Classic 1.12 Spell.dbc field additions: - Add CastingTimeIndex=15, PowerType=28, ManaCost=29, RangeIndex=33 to classic/dbc_layouts.json so Classic spellbook shows mana cost, cast time, and range in tooltips Trainer fieldCount guard: - Lower Trainer::loadSpellNameCache() Spell.dbc fieldCount threshold from 154 to 148 so Classic trainers correctly resolve spell names from Spell.dbc
This commit is contained in:
parent
2f3f9f1a21
commit
53d144c51e
5 changed files with 23 additions and 6 deletions
|
|
@ -15671,8 +15671,10 @@ void GameHandler::loadSpellNameCache() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (dbc->getFieldCount() < 154) {
|
||||
LOG_WARNING("Trainer: Spell.dbc has too few fields");
|
||||
// Classic 1.12 Spell.dbc has 148 fields; TBC/WotLK have more.
|
||||
// Require at least 148 so Classic trainers can resolve spell names.
|
||||
if (dbc->getFieldCount() < 148) {
|
||||
LOG_WARNING("Trainer: Spell.dbc has too few fields (", dbc->getFieldCount(), ")");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue