mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user