mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-15 00:43:52 +00:00
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:
parent
f5a3ebc774
commit
cd29c6d50b
2 changed files with 3 additions and 17 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue