refactor: deduplicate class name functions in talent_screen and game_screen

Replace local getClassName()/classNameStr() with shared
game::getClassName() from character.hpp, removing 2 duplicate
name-lookup implementations (static arrays + wrapper functions).
This commit is contained in:
Kelsi 2026-03-27 14:30:45 -07:00
parent f5a3ebc774
commit cd29c6d50b
2 changed files with 3 additions and 17 deletions

View file

@ -125,13 +125,9 @@ namespace {
return static_cast<uint8_t>((bytes0 >> 8) & 0xFF);
}
// Return the English class name for a class ID (1-11), or "Unknown".
// Alias for shared class name helper
const char* classNameStr(uint8_t classId) {
static const char* kNames[] = {
"Unknown","Warrior","Paladin","Hunter","Rogue","Priest",
"Death Knight","Shaman","Mage","Warlock","","Druid"
};
return (classId < 12) ? kNames[classId] : "Unknown";
return wowee::game::getClassName(static_cast<wowee::game::Class>(classId));
}
bool isPortBotTarget(const std::string& target) {