Core/Pets: Fixed crash happening when summoning a different pet than one that was unsummoned by summoning a guardian (imp -> infernal -> felhunter)
Port From (https://github.com/TrinityCore/TrinityCore/commit/e102022eeb8a0fd402e34de92468b2afb8f1f006)
This commit is contained in:
@@ -127,8 +127,9 @@ namespace Game.Entities
|
||||
if (oldPet != minion && (oldPet.IsPet() || minion.IsPet() || oldPet.GetEntry() != minion.GetEntry()))
|
||||
{
|
||||
// remove existing minion pet
|
||||
if (oldPet.IsPet())
|
||||
((Pet)oldPet).Remove(PetSaveMode.AsCurrent);
|
||||
Pet oldPetAsPet = oldPet.ToPet();
|
||||
if (oldPetAsPet != null)
|
||||
oldPetAsPet.Remove(PetSaveMode.NotInSlot);
|
||||
else
|
||||
oldPet.UnSummon();
|
||||
SetPetGUID(minion.GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user