From b08a58dec6511b757fea7d9fb3a1a178d56d8bba Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 2 Sep 2022 15:12:28 +0200 Subject: Core/Misc: Reduce differences between branches (refactors from 44ac5cbbea4f8e17be978412681634130f006d16) --- src/server/game/Spells/SpellMgr.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/server/game') diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 5eb160086c2..00f92b8359e 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2105,15 +2105,12 @@ void SpellMgr::LoadPetLevelupSpellMap() if (!creatureFamily->SkillLine[j]) continue; - for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k) - { - SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(k); - if (!skillLine) - continue; - - if (skillLine->SkillLine != creatureFamily->SkillLine[j]) - continue; + std::vector const* skillLineAbilities = sDB2Manager.GetSkillLineAbilitiesBySkill(creatureFamily->SkillLine[j]); + if (!skillLineAbilities) + continue; + for (SkillLineAbilityEntry const* skillLine : *skillLineAbilities) + { if (skillLine->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) continue; -- cgit v1.2.3