fix(Core/Pets): fixed crash happening when current pet is forcibly removed (#10025)

This commit is contained in:
Kargatum
2022-01-10 19:19:43 +07:00
committed by GitHub
parent b2df4aa970
commit c1ebda66ba
8 changed files with 50 additions and 10 deletions

View File

@@ -4713,7 +4713,7 @@ void Spell::EffectDismissPet(SpellEffIndex effIndex)
Pet* pet = unitTarget->ToPet();
ExecuteLogEffectUnsummonObject(effIndex, pet);
pet->GetOwner()->RemovePet(pet, PET_SAVE_NOT_IN_SLOT);
pet->Remove(PET_SAVE_NOT_IN_SLOT);
}
void Spell::EffectSummonObject(SpellEffIndex effIndex)