fix(Core): check spell info and prevent crash (#6454)

This commit is contained in:
Francesco Borzì
2021-06-20 19:52:44 +02:00
committed by GitHub
parent 08e205d44b
commit 36a6d04156
2 changed files with 22 additions and 1 deletions

View File

@@ -4417,7 +4417,11 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
{
next = itr;
++next;
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first);
SpellInfo const* spellInfo = sSpellMgr->CheckSpellInfo(itr->first);
if (!spellInfo)
{
continue;
}
if (spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS))
RemoveSpellCooldown(itr->first, true);