mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
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)
|
||||
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;
|
||||
}
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
@@ -97,8 +100,6 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
|
||||
if (!fields)
|
||||
return PET_LOAD_ERROR;
|
||||
|
||||
Player* owner = GetPlayer();
|
||||
|
||||
// update for case of current pet "slot = 0"
|
||||
uint32 petentry = fields[1].GetUInt32();
|
||||
if (!petentry)
|
||||
|
||||
Reference in New Issue
Block a user