Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h src/server/game/Handlers/PetHandler.cpp src/server/game/Spells/Spell.cpp src/server/game/Spells/Spell.h
This commit is contained in:
commit
11ecb9c633
10 files changed
+313
-83
No files matched your search
@@ -1506,16 +1506,16 @@ void Pet::InitLevelupSpellsForLevel()
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_CREATURE_SPELL_DATA_SLOT; ++i)
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(defSpells->spellid[i]);
|
||||
if (!spellEntry)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(defSpells->spellid[i]);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
// will called first if level down
|
||||
if (spellEntry->SpellLevel > level)
|
||||
unlearnSpell(spellEntry->Id, true);
|
||||
if (spellInfo->SpellLevel > level)
|
||||
unlearnSpell(spellInfo->Id, true);
|
||||
// will called if level up
|
||||
else
|
||||
learnSpell(spellEntry->Id);
|
||||
learnSpell(spellInfo->Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user