mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
@@ -1941,16 +1941,16 @@ void Pet::InitLevelupSpellsForLevel()
|
||||
{
|
||||
for (uint32 spellId : defSpells->spellid)
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellEntry)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
// will called first if level down
|
||||
if (spellEntry->SpellLevel > level && sScriptMgr->CanUnlearnSpellDefault(this, spellEntry))
|
||||
unlearnSpell(spellEntry->Id, true);
|
||||
if (spellInfo->SpellLevel > level && sScriptMgr->CanUnlearnSpellDefault(this, spellInfo))
|
||||
unlearnSpell(spellInfo->Id, true);
|
||||
// will called if level up
|
||||
else
|
||||
learnSpell(spellEntry->Id);
|
||||
learnSpell(spellInfo->Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user