Core/Creatures: Filter out trainer spells that belong to a skill that can never be learned by a player with given class and race combination (#23176)

Closes #23172

(cherry picked from commit f221fcdd4b91e27c69a38dc665621797af0640c9)
This commit is contained in:
Jozef Dúc
2021-11-27 01:18:19 +01:00
committed by Shauren
parent 636302b146
commit 10fcfde78b
@@ -25178,6 +25178,10 @@ bool Player::IsSpellFitByClassAndRace(uint32 spell_id) const
if (_spell_idx->second->ClassMask && (_spell_idx->second->ClassMask & classmask) == 0)
continue;
// skip wrong class and race skill saved in SkillRaceClassInfo.dbc
if (!sDB2Manager.GetSkillRaceClassInfo(_spell_idx->second->SkillLine, getRace(), getClass()))
continue;
return true;
}