fix(Core/Pets): fix crash at pet resurrect (#10120)
This commit is contained in:
parent
2781c9810f
commit
7f05e20994
8 changed files with 301 additions and 226 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue