mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Prevent using loading pet from DB code for non-player pets.
This commit is contained in:
parent
3c774f9c68
commit
3488c1fee3
4 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue