Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-08-01 15:41:23 +08:00
251 changed files with 4841 additions and 6135 deletions

View File

@@ -111,12 +111,6 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
SendPartyResult(PARTY_OP_INVITE, membername, ERR_TARGET_NOT_IN_INSTANCE_S);
return;
}
// just ignore us
if (invitedPlayer->GetInstanceId() != 0 && invitedPlayer->GetDungeonDifficulty() != invitingPlayer->GetDungeonDifficulty())
{
SendPartyResult(PARTY_OP_INVITE, membername, ERR_IGNORING_YOU_S);
return;
}
if (invitedPlayer->GetSocial()->HasIgnore(invitingPlayer->GetGUID()))
{
@@ -1030,7 +1024,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket& recvData)
data << uint16(player->GetPositionY()); // GROUP_UPDATE_FLAG_POSITION
uint64 auraMask = 0;
size_t maskPos = data.wpos();
std::size_t maskPos = data.wpos();
data << uint64(auraMask); // placeholder
for (uint8 i = 0; i < MAX_AURAS_GROUP_UPDATE; ++i)
{

View File

@@ -1074,7 +1074,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid, uint32 vendorEntry)
WorldPacket data(SMSG_LIST_INVENTORY, 8 + 1 + itemCount * 8 * 4);
data << vendorGuid;
size_t countPos = data.wpos();
std::size_t countPos = data.wpos();
data << uint8(count);
float discountMod = _player->GetReputationPriceDiscount(vendor);

View File

@@ -660,7 +660,7 @@ void WorldSession::HandleGetMailList(WorldPacket& recvData)
uint8 item_count = uint8(mail->items.size()); // max count is MAX_MAIL_ITEMS (12)
size_t next_mail_size = 2 + 4 + 1 + (mail->messageType == MAIL_NORMAL ? 8 : 4) + 4 * 8 + (mail->subject.size() + 1) + (mail->body.size() + 1) + 1 + item_count * (1 + 4 + 4 + MAX_INSPECTED_ENCHANTMENT_SLOT * 3 * 4 + 4 + 4 + 4 + 4 + 4 + 4 + 1);
std::size_t next_mail_size = 2 + 4 + 1 + (mail->messageType == MAIL_NORMAL ? 8 : 4) + 4 * 8 + (mail->subject.size() + 1) + (mail->body.size() + 1) + 1 + item_count * (1 + 4 + 4 + MAX_INSPECTED_ENCHANTMENT_SLOT * 3 * 4 + 4 + 4 + 4 + 4 + 4 + 4 + 1);
if (data.wpos() + next_mail_size > MAX_NETCLIENT_PACKET_SIZE)
{

View File

@@ -124,7 +124,7 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
data << guid;
data << uint32(trainer_spells->trainerType);
size_t count_pos = data.wpos();
std::size_t count_pos = data.wpos();
data << uint32(trainer_spells->spellList.size());
// reputation discount
@@ -483,7 +483,7 @@ void WorldSession::SendStablePet(ObjectGuid guid)
WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size
data << guid;
size_t wpos = data.wpos();
std::size_t wpos = data.wpos();
data << uint8(0); // place holder for slot show number
PetStable* petStable = GetPlayer()->GetPetStable();

View File

@@ -149,10 +149,10 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
CreatureQuestItemList const* items = sObjectMgr->GetCreatureQuestItemList(entry);
if (items)
for (size_t i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
for (std::size_t i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
data << (i < items->size() ? uint32((*items)[i]) : uint32(0));
else
for (size_t i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
for (std::size_t i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
data << uint32(0);
data << uint32(ci->movementId); // CreatureMovementInfo.dbc
@@ -210,10 +210,10 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
GameObjectQuestItemList const* items = sObjectMgr->GetGameObjectQuestItemList(entry);
if (items)
for (size_t i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
for (std::size_t i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
data << (i < items->size() ? uint32((*items)[i]) : uint32(0));
else
for (size_t i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
for (std::size_t i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
data << uint32(0);
SendPacket(&data);

View File

@@ -641,7 +641,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
void WorldSession::HandleQueryQuestsCompleted(WorldPacket& /*recvData*/)
{
size_t rew_count = _player->GetRewardedQuestCount();
std::size_t rew_count = _player->GetRewardedQuestCount();
WorldPacket data(SMSG_QUERY_QUESTS_COMPLETED_RESPONSE, 4 + 4 * rew_count);
data << uint32(rew_count);