Core/Misc: Reduce differences between branches (refactors from 44ac5cbbea)

This commit is contained in:
Shauren
2022-09-02 15:12:28 +02:00
parent 0de520ed92
commit b08a58dec6
2 changed files with 10 additions and 17 deletions

View File

@@ -2105,15 +2105,12 @@ void SpellMgr::LoadPetLevelupSpellMap()
if (!creatureFamily->SkillLine[j])
continue;
for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k)
std::vector<SkillLineAbilityEntry const*> const* skillLineAbilities = sDB2Manager.GetSkillLineAbilitiesBySkill(creatureFamily->SkillLine[j]);
if (!skillLineAbilities)
continue;
for (SkillLineAbilityEntry const* skillLine : *skillLineAbilities)
{
SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(k);
if (!skillLine)
continue;
if (skillLine->SkillLine != creatureFamily->SkillLine[j])
continue;
if (skillLine->AcquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN)
continue;

View File

@@ -423,16 +423,12 @@ public:
{
uint32 classmask = player->GetClassMask();
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
std::vector<SkillLineAbilityEntry const*> const* skillLineAbilities = sDB2Manager.GetSkillLineAbilitiesBySkill(skillId);
if (!skillLineAbilities)
return;
for (SkillLineAbilityEntry const* skillLine : *skillLineAbilities)
{
SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(j);
if (!skillLine)
continue;
// wrong skill
if (skillLine->SkillLine != int32(skillId))
continue;
// not high rank
if (skillLine->SupercedesSpell)
continue;