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 f221fcdd4b)
This commit is contained in:
Jozef Dúc
2019-04-11 21:06:53 +02:00
committed by Shauren
parent 636302b146
commit 10fcfde78b

View File

@@ -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;
}