Core/Pets: Pet management refactoring
Port From (https://github.com/TrinityCore/TrinityCore/commit/ca92686b44cc8c53a8991bf02d6e8534797fc115)
This commit is contained in:
@@ -2293,14 +2293,14 @@ namespace Game.Spells
|
||||
}
|
||||
|
||||
if (owner.IsTypeId(TypeId.Player))
|
||||
owner.ToPlayer().RemovePet(OldSummon, (OldSummon.GetPetType() == PetType.Hunter ? PetSaveMode.AsDeleted : PetSaveMode.NotInSlot), false);
|
||||
owner.ToPlayer().RemovePet(OldSummon, PetSaveMode.NotInSlot, false);
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
float x, y, z;
|
||||
owner.GetClosePoint(out x, out y, out z, owner.GetCombatReach());
|
||||
Pet pet = owner.SummonPet(petentry, x, y, z, owner.Orientation, PetType.Summon, 0, true);
|
||||
Pet pet = owner.SummonPet(petentry, x, y, z, owner.Orientation, PetType.Summon, 0);
|
||||
if (!pet)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user