feat(Core/Spell): AssertSpellInfo (#6115)

* feat(Core/Spell): AssertSpellInfo

(cherry picked from commit e52878b6b5)
(cherry picked from commit 8c44259fae)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>

* Update SpellMgr.h
This commit is contained in:
Kitzunu
2021-06-03 07:39:48 +02:00
committed by GitHub
parent 7152ddc82c
commit a75e34c793
15 changed files with 29 additions and 29 deletions

View File

@@ -1997,7 +1997,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
sSpellMgr->GetSetOfSpellsInSpellGroupWithFlag(1, SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE, availableElixirs);
for (std::set<uint32>::iterator itr = availableElixirs.begin(); itr != availableElixirs.end();)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(*itr);
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(*itr);
if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->getLevel())
availableElixirs.erase(itr++);
else