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

Port From (https://github.com/TrinityCore/TrinityCore/commit/10fcfde78b7ebf9008d148d5db67e183e3402d55)
This commit is contained in:
hondacrx
2021-12-01 10:21:01 -05:00
parent 8d8479b49e
commit 850bc4edc4
+4
View File
@@ -7122,6 +7122,10 @@ namespace Game.Entities
if (_spell_idx.ClassMask != 0 && (_spell_idx.ClassMask & classmask) == 0)
continue;
// skip wrong class and race skill saved in SkillRaceClassInfo.dbc
if (Global.DB2Mgr.GetSkillRaceClassInfo(_spell_idx.SkillLine, GetRace(), GetClass()) == null)
continue;
return true;
}