From 42e7e1ce7e59d42c4ce7aed1338d2db3539e9640 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 17 Feb 2026 14:55:32 -0800 Subject: [PATCH] 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. --- src/ui/game_screen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index d1f362d8..e09f5754 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -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