fix(Core/Pets): fix crash at pet resurrect (#10120)

This commit is contained in:
Kargatum
2022-01-16 05:08:54 +07:00
committed by GitHub
parent 2781c9810f
commit 7f05e20994
8 changed files with 301 additions and 226 deletions

View File

@@ -5932,17 +5932,6 @@ SpellCastResult Spell::CheckCast(bool strict)
if (pet && pet->IsAlive())
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
Player* player = unitCaster->ToPlayer();
if (player)
{
// Check pet before resurrect
auto [petStable, petSlot] = Pet::GetLoadPetInfo(*player->GetPetStable(), 0, 0, false);
if (!petStable)
{
return SPELL_FAILED_NO_PET;
}
}
break;
}
// This is generic summon effect