diff --git a/Data/expansions/wotlk/dbc_layouts.json b/Data/expansions/wotlk/dbc_layouts.json index 5b500741..d802b540 100644 --- a/Data/expansions/wotlk/dbc_layouts.json +++ b/Data/expansions/wotlk/dbc_layouts.json @@ -1,7 +1,8 @@ { "Spell": { "ID": 0, "Attributes": 4, "IconID": 133, - "Name": 136, "Tooltip": 139, "Rank": 153, "SchoolMask": 225 + "Name": 136, "Tooltip": 139, "Rank": 153, "SchoolMask": 225, + "PowerType": 14, "ManaCost": 39, "CastingTimeIndex": 47, "RangeIndex": 49 }, "ItemDisplayInfo": { "ID": 0, "LeftModel": 1, "LeftModelTexture": 3, diff --git a/src/ui/spellbook_screen.cpp b/src/ui/spellbook_screen.cpp index eec714b9..38c01fe8 100644 --- a/src/ui/spellbook_screen.cpp +++ b/src/ui/spellbook_screen.cpp @@ -45,8 +45,10 @@ void SpellbookScreen::loadSpellDBC(pipeline::AssetManager* assetManager) { } uint32_t fieldCount = dbc->getFieldCount(); - if (fieldCount < 154) { - LOG_WARNING("Spellbook: Spell.dbc has ", fieldCount, " fields, expected 234+"); + // Classic 1.12 Spell.dbc has 148 fields (Tooltip at index 147), TBC has ~167, WotLK has 234. + // Require at least 148 fields so all expansions can load spell names/icons via the DBC layout. + if (fieldCount < 148) { + LOG_WARNING("Spellbook: Spell.dbc has ", fieldCount, " fields, too few to load"); return; }