fix(Core/Pet): only show pet details for hunter pets and demons (#2637)

This commit is contained in:
Stoabrogga
2020-02-28 17:02:54 +01:00
committed by GitHub
parent 9adba482c2
commit 2eb0705668
2 changed files with 9 additions and 3 deletions

View File

@@ -160,7 +160,10 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
return PET_LOAD_OK;
}
pet->GetCharmInfo()->SetPetNumber(pet_number, pet->IsPermanentPetFor(owner));
if (pet->getPetType() == HUNTER_PET || pet->GetCreatureTemplate()->type == CREATURE_TYPE_DEMON)
pet->GetCharmInfo()->SetPetNumber(pet_number, pet->IsPermanentPetFor(owner)); // Show pet details tab (Shift+P) only for hunter pets or demons
else
pet->GetCharmInfo()->SetPetNumber(pet_number, false);
pet->SetDisplayId(fields[3].GetUInt32());
pet->SetNativeDisplayId(fields[3].GetUInt32());