Core/Spells: skip over deprecated talents when generating their ranks

This commit is contained in:
Ovahlord
2025-04-16 12:12:31 +02:00
parent 2e971321cf
commit 6cbfd4a227

View File

@@ -826,6 +826,12 @@ void SpellMgr::LoadSpellTalentRanks()
for (TalentEntry const* talentInfo : sTalentStore)
{
// In Classic, the Talent.db2 and TalentTab.db2 are polluted with deprecated data which can be
// identified by a negative order index. We just skip these.
TalentTabEntry const* talentTab = sTalentTabStore.LookupEntry(talentInfo->TabID);
if (!talentTab || talentTab->OrderIndex < 0)
continue;
SpellInfo const* lastSpell = nullptr;
for (size_t rank = talentInfo->SpellRank.size() - 1; rank > 0; --rank)
{