Core/Pets: Updated pet summoning for latest client version (5 Call Pet spells and stable size 200)

This commit is contained in:
Shauren
2022-02-02 00:08:37 +01:00
parent d6a2461fc7
commit 950db60435
18 changed files with 395 additions and 458 deletions

View File

@@ -538,7 +538,7 @@ void WorldSession::HandlePetRename(WorldPackets::Pet::PetRename& packet)
if (!pet || !pet->IsPet() || ((Pet*)pet)->getPetType() != HUNTER_PET ||
!pet->HasPetFlag(UNIT_PET_FLAG_CAN_BE_RENAMED) ||
pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo() ||
!petStable || !petStable->CurrentPet || petStable->CurrentPet->PetNumber != pet->GetCharmInfo()->GetPetNumber())
!petStable || !petStable->GetCurrentPet() || petStable->GetCurrentPet()->PetNumber != pet->GetCharmInfo()->GetPetNumber())
return;
PetNameInvalidReason res = ObjectMgr::CheckPetName(name);
@@ -560,8 +560,8 @@ void WorldSession::HandlePetRename(WorldPackets::Pet::PetRename& packet)
pet->RemovePetFlag(UNIT_PET_FLAG_CAN_BE_RENAMED);
petStable->CurrentPet->Name = name;
petStable->CurrentPet->WasRenamed = true;
petStable->GetCurrentPet()->Name = name;
petStable->GetCurrentPet()->WasRenamed = true;
if (declinedname)
{