mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix action bar spell icons missing on Turtle WoW
Turtle/Classic Spell.csv files are garbled (field 0 is a string rather than a numeric ID) so loadDBC() falls back to the WotLK binary Spell.dbc (234 fields). getSpellIcon() was still using the Turtle layout (IconID at field 117) to read the WotLK binary, producing garbage values and no icons. When the loaded Spell.dbc has >=200 fields it is the WotLK binary; use the WotLK IconID field (133) directly, matching the same approach already used in spellbook_screen.cpp.
This commit is contained in:
parent
7cf060a9f6
commit
42e7e1ce7e
1 changed files with 6 additions and 1 deletions
|
|
@ -2986,7 +2986,12 @@ GLuint GameScreen::getSpellIcon(uint32_t spellId, pipeline::AssetManager* am) {
|
|||
}
|
||||
}
|
||||
};
|
||||
if (spellL) {
|
||||
// If the DBC has WotLK-range field count (≥200 fields), it's the binary
|
||||
// WotLK Spell.dbc (CSV fallback). Use WotLK layout regardless of expansion,
|
||||
// since Turtle/Classic CSV files are garbled and fall back to WotLK binary.
|
||||
if (fieldCount >= 200) {
|
||||
tryLoadIcons(0, 133); // WotLK IconID field
|
||||
} else if (spellL) {
|
||||
tryLoadIcons((*spellL)["ID"], (*spellL)["IconID"]);
|
||||
}
|
||||
// Fallback to WotLK field 133 if expansion layout yielded nothing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue