Prevent using loading pet from DB code for non-player pets.

This commit is contained in:
VladimirMangos 2008-12-26 12:47:03 +03:00
parent 3c774f9c68
commit 3488c1fee3
4 changed files with 5 additions and 5 deletions

View file

@ -8419,7 +8419,7 @@ void Unit::Unmount()
if(GetTypeId() == TYPEID_PLAYER && IsInWorld() && ((Player*)this)->GetTemporaryUnsummonedPetNumber() && isAlive())
{
Pet* NewPet = new Pet;
if(!NewPet->LoadPetFromDB(this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true))
if(!NewPet->LoadPetFromDB((Player*)this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true))
delete NewPet;
((Player*)this)->SetTemporaryUnsummonedPetNumber(0);