fix(Core/Pets): do not summon pet if owner is being teleported (#7275)
- Closes #7159
This commit is contained in:
@@ -88,8 +88,11 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
|
|||||||
if (!result)
|
if (!result)
|
||||||
return PET_LOAD_NO_RESULT;
|
return PET_LOAD_NO_RESULT;
|
||||||
|
|
||||||
if (!GetPlayer() || GetPlayer()->GetPet() || GetPlayer()->GetVehicle() || GetPlayer()->IsSpectator())
|
Player* owner = GetPlayer();
|
||||||
|
if (!owner || owner->GetPet() || owner->GetVehicle() || owner->IsSpectator() || owner->IsBeingTeleportedFar())
|
||||||
|
{
|
||||||
return PET_LOAD_ERROR;
|
return PET_LOAD_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
|
|
||||||
@@ -97,8 +100,6 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
|
|||||||
if (!fields)
|
if (!fields)
|
||||||
return PET_LOAD_ERROR;
|
return PET_LOAD_ERROR;
|
||||||
|
|
||||||
Player* owner = GetPlayer();
|
|
||||||
|
|
||||||
// update for case of current pet "slot = 0"
|
// update for case of current pet "slot = 0"
|
||||||
uint32 petentry = fields[1].GetUInt32();
|
uint32 petentry = fields[1].GetUInt32();
|
||||||
if (!petentry)
|
if (!petentry)
|
||||||
|
|||||||
Reference in New Issue
Block a user