feat: color player cast bar by spell school from Spell.dbc

The player's own cast bar now uses spell-school-based colors for quick
identification: Fire=orange-red, Frost=icy blue, Shadow=purple,
Arcane=violet, Nature=green, Holy=golden, Physical=gold. Channels
remain blue regardless of school. Adds getSpellSchoolMask() using the
already-loaded Spell.dbc cache (schoolMask field, covering all
expansions including Classic SchoolEnum→bitmask conversion).
This commit is contained in:
Kelsi 2026-03-17 19:56:52 -07:00
parent d0df6eed2c
commit 4ce6fdb5f3
3 changed files with 25 additions and 3 deletions

View file

@ -21576,6 +21576,13 @@ bool GameHandler::isSpellInterruptible(uint32_t spellId) const {
return (it->second.attrEx & 0x00000010u) == 0;
}
uint32_t GameHandler::getSpellSchoolMask(uint32_t spellId) const {
if (spellId == 0) return 0;
const_cast<GameHandler*>(this)->loadSpellNameCache();
auto it = spellNameCache_.find(spellId);
return (it != spellNameCache_.end()) ? it->second.schoolMask : 0;
}
const std::string& GameHandler::getSkillLineName(uint32_t spellId) const {
auto slIt = spellToSkillLine_.find(spellId);
if (slIt == spellToSkillLine_.end()) return EMPTY_STRING;