diff options
Diffstat (limited to 'src/server/game/Handlers/PetHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/PetHandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index d03c811c241..18b69ac2d0b 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -416,7 +416,7 @@ void WorldSession::SendQueryPetNameResponse(ObjectGuid guid) if (Creature* unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid)) { response.Allow = true; - response.Timestamp = unit->GetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP); + response.Timestamp = unit->m_unitData->PetNameTimestamp; response.Name = unit->GetName(); if (Pet* pet = unit->ToPet()) @@ -446,7 +446,7 @@ bool WorldSession::CheckStableMaster(ObjectGuid guid) // stable master case else { - if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER)) + if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER, UNIT_NPC_FLAG_2_NONE)) { TC_LOG_DEBUG("entities.player", "Stablemaster %s not found or you can't interact with him.", guid.ToString().c_str()); return false; @@ -523,7 +523,7 @@ void WorldSession::HandlePetRename(WorldPackets::Pet::PetRename& packet) Pet* pet = ObjectAccessor::GetPet(*_player, petguid); // check it! if (!pet || !pet->IsPet() || ((Pet*)pet)->getPetType() != HUNTER_PET || - !pet->HasByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PET_FLAGS, UNIT_CAN_BE_RENAMED) || + !pet->HasPetFlag(UNIT_PET_FLAG_CAN_BE_RENAMED) || pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo()) return; @@ -544,7 +544,7 @@ void WorldSession::HandlePetRename(WorldPackets::Pet::PetRename& packet) pet->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_NAME); - pet->RemoveByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PET_FLAGS, UNIT_CAN_BE_RENAMED); + pet->RemovePetFlag(UNIT_PET_FLAG_CAN_BE_RENAMED); if (declinedname) { @@ -584,7 +584,7 @@ void WorldSession::HandlePetRename(WorldPackets::Pet::PetRename& packet) CharacterDatabase.CommitTransaction(trans); - pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped + pet->SetPetNameTimestamp(uint32(time(NULL))); } void WorldSession::HandlePetAbandon(WorldPackets::Pet::PetAbandon& packet) |