fix(Core/Pet): only show pet details for hunter pets and demons (#2637)
This commit is contained in:
@@ -2203,8 +2203,11 @@ void Pet::HandleAsynchLoadFailed(AsynchPetSummon* info, Player* player, uint8 as
|
|||||||
|
|
||||||
if (info->m_petType == SUMMON_PET)
|
if (info->m_petType == SUMMON_PET)
|
||||||
{
|
{
|
||||||
// this enables pet details window (Shift+P)
|
if (pet->GetCreatureTemplate()->type == CREATURE_TYPE_DEMON)
|
||||||
pet->GetCharmInfo()->SetPetNumber(pet_number, true);
|
pet->GetCharmInfo()->SetPetNumber(pet_number, true); // Show pet details tab (Shift+P) only for demons
|
||||||
|
else
|
||||||
|
pet->GetCharmInfo()->SetPetNumber(pet_number, false);
|
||||||
|
|
||||||
pet->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
|
pet->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
|
||||||
pet->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
pet->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
||||||
pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
|
pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
|
||||||
|
|||||||
@@ -160,7 +160,10 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
|
|||||||
return PET_LOAD_OK;
|
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->SetDisplayId(fields[3].GetUInt32());
|
||||||
pet->SetNativeDisplayId(fields[3].GetUInt32());
|
pet->SetNativeDisplayId(fields[3].GetUInt32());
|
||||||
|
|||||||
Reference in New Issue
Block a user