diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-01-28 01:53:26 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-01-28 01:53:26 +0100 |
| commit | 4bec7233badf9d3ab71dbdde8b24f66f7c4eedfb (patch) | |
| tree | b0d28e475ba99293fd0ca531a82a3446a027078f /src/server/game/Server/Packets | |
| parent | 1bb9ba457418889d848998ccf6d412b1b369a5d3 (diff) | |
Core: Updated to 10.0.5
Diffstat (limited to 'src/server/game/Server/Packets')
| -rw-r--r-- | src/server/game/Server/Packets/BattlegroundPackets.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/BattlegroundPackets.h | 8 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/CraftingPacketsCommon.cpp | 9 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/CraftingPacketsCommon.h | 9 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/MailPackets.cpp | 16 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/MailPackets.h | 32 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/PerksProgramPacketsCommon.cpp | 38 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/PerksProgramPacketsCommon.h | 42 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/QuestPackets.cpp | 16 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/QuestPackets.h | 10 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/SpellPackets.cpp | 1 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/SpellPackets.h | 1 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/SystemPackets.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/SystemPackets.h | 3 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/TicketPackets.h | 4 |
15 files changed, 166 insertions, 47 deletions
diff --git a/src/server/game/Server/Packets/BattlegroundPackets.cpp b/src/server/game/Server/Packets/BattlegroundPackets.cpp index 2fa88ef4901..921dd72cde0 100644 --- a/src/server/game/Server/Packets/BattlegroundPackets.cpp +++ b/src/server/game/Server/Packets/BattlegroundPackets.cpp @@ -348,6 +348,14 @@ WorldPacket const* WorldPackets::Battleground::RatedPvpInfo::Write() return &_worldPacket; } +ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Battleground::RatedMatchDeserterPenalty const& ratedMatchDeserterPenalty) +{ + data << int32(ratedMatchDeserterPenalty.PersonalRatingChange); + data << int32(ratedMatchDeserterPenalty.QueuePenaltySpellID); + data << ratedMatchDeserterPenalty.QueuePenaltyDuration; + return data; +} + WorldPacket const* WorldPackets::Battleground::PVPMatchInitialize::Write() { _worldPacket << uint32(MapID); @@ -358,8 +366,12 @@ WorldPacket const* WorldPackets::Battleground::PVPMatchInitialize::Write() _worldPacket << uint32(BattlemasterListID); _worldPacket.WriteBit(Registered); _worldPacket.WriteBit(AffectsRating); + _worldPacket.WriteBit(DeserterPenalty.has_value()); _worldPacket.FlushBits(); + if (DeserterPenalty) + _worldPacket << *DeserterPenalty; + return &_worldPacket; } diff --git a/src/server/game/Server/Packets/BattlegroundPackets.h b/src/server/game/Server/Packets/BattlegroundPackets.h index 587efc4e224..b1a6f5bbe89 100644 --- a/src/server/game/Server/Packets/BattlegroundPackets.h +++ b/src/server/game/Server/Packets/BattlegroundPackets.h @@ -465,6 +465,13 @@ namespace WorldPackets } Bracket[6]; }; + struct RatedMatchDeserterPenalty + { + int32 PersonalRatingChange = 0; + int32 QueuePenaltySpellID = 0; + WorldPackets::Duration<Milliseconds, int32> QueuePenaltyDuration; + }; + class PVPMatchInitialize final : public ServerPacket { public: @@ -483,6 +490,7 @@ namespace WorldPackets MatchState State = Inactive; Timestamp<> StartTime; WorldPackets::Duration<Seconds> Duration; + Optional<RatedMatchDeserterPenalty> DeserterPenalty; uint8 ArenaFaction = 0; uint32 BattlemasterListID = 0; bool Registered = false; diff --git a/src/server/game/Server/Packets/CraftingPacketsCommon.cpp b/src/server/game/Server/Packets/CraftingPacketsCommon.cpp index d06b0e21e7d..de5189183e5 100644 --- a/src/server/game/Server/Packets/CraftingPacketsCommon.cpp +++ b/src/server/game/Server/Packets/CraftingPacketsCommon.cpp @@ -30,11 +30,12 @@ ByteBuffer& operator<<(ByteBuffer& data, SpellReducedReagent const& spellReduced ByteBuffer& operator<<(ByteBuffer& data, CraftingData const& craftingData) { data << int32(craftingData.CraftingQualityID); - data << int32(craftingData.field_4); - data << int32(craftingData.field_8); + data << float(craftingData.QualityProgress); + data << int32(craftingData.SkillLineAbilityID); + data << int32(craftingData.CraftingDataID); data << int32(craftingData.Multicraft); - data << int32(craftingData.field_10); - data << int32(craftingData.field_14); + data << int32(craftingData.SkillFromReagents); + data << int32(craftingData.Skill); data << int32(craftingData.CritBonusSkill); data << float(craftingData.field_1C); data << uint64(craftingData.field_20); diff --git a/src/server/game/Server/Packets/CraftingPacketsCommon.h b/src/server/game/Server/Packets/CraftingPacketsCommon.h index b74d77cda29..9426662d460 100644 --- a/src/server/game/Server/Packets/CraftingPacketsCommon.h +++ b/src/server/game/Server/Packets/CraftingPacketsCommon.h @@ -32,11 +32,12 @@ struct SpellReducedReagent struct CraftingData { int32 CraftingQualityID = 0; - int32 field_4 = 0; - int32 field_8 = 0; + float QualityProgress = 0.0f; + int32 SkillLineAbilityID = 0; + int32 CraftingDataID = 0; int32 Multicraft = 0; - int32 field_10 = 0; - int32 field_14 = 0; + int32 SkillFromReagents = 0; + int32 Skill = 0; int32 CritBonusSkill = 0; float field_1C = 0.0f; uint64 field_20 = 0; diff --git a/src/server/game/Server/Packets/MailPackets.cpp b/src/server/game/Server/Packets/MailPackets.cpp index 5bfb0f0ff8f..95582186f86 100644 --- a/src/server/game/Server/Packets/MailPackets.cpp +++ b/src/server/game/Server/Packets/MailPackets.cpp @@ -58,7 +58,7 @@ WorldPackets::Mail::MailAttachedItem::MailAttachedItem(::Item const* item, uint8 ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailAttachedItem const& att) { data << uint8(att.Position); - data << int32(att.AttachID); + data << uint64(att.AttachID); data << int32(att.Count); data << int32(att.Charges); data << uint32(att.MaxDurability); @@ -114,7 +114,7 @@ WorldPackets::Mail::MailListEntry::MailListEntry(::Mail const* mail, ::Player* p ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailListEntry const& entry) { - data << int32(entry.MailID); + data << uint64(entry.MailID); data << uint8(entry.SenderType); data << uint64(entry.Cod); data << int32(entry.StationeryID); @@ -198,12 +198,12 @@ void WorldPackets::Mail::MailReturnToSender::Read() WorldPacket const* WorldPackets::Mail::MailCommandResult::Write() { - _worldPacket << uint32(MailID); - _worldPacket << uint32(Command); - _worldPacket << uint32(ErrorCode); - _worldPacket << uint32(BagResult); - _worldPacket << uint32(AttachID); - _worldPacket << uint32(QtyInInventory); + _worldPacket << uint64(MailID); + _worldPacket << int32(Command); + _worldPacket << int32(ErrorCode); + _worldPacket << int32(BagResult); + _worldPacket << uint64(AttachID); + _worldPacket << int32(QtyInInventory); return &_worldPacket; } diff --git a/src/server/game/Server/Packets/MailPackets.h b/src/server/game/Server/Packets/MailPackets.h index 5c65dce692e..2dc1fc3eb96 100644 --- a/src/server/game/Server/Packets/MailPackets.h +++ b/src/server/game/Server/Packets/MailPackets.h @@ -34,7 +34,7 @@ namespace WorldPackets MailAttachedItem(::Item const* item, uint8 pos); uint8 Position = 0; - int32 AttachID = 0; + uint64 AttachID = 0; Item::ItemInstance Item; int32 Count = 0; int32 Charges = 0; @@ -49,7 +49,7 @@ namespace WorldPackets { MailListEntry(::Mail const* mail, ::Player* player); - int32 MailID = 0; + uint64 MailID = 0; uint8 SenderType = 0; Optional<ObjectGuid> SenderCharacter; Optional<uint32> AltSenderID; @@ -93,7 +93,7 @@ namespace WorldPackets void Read() override; ObjectGuid Mailbox; - uint32 MailID = 0; + uint64 MailID = 0; }; class SendMail final : public ClientPacket @@ -131,12 +131,12 @@ namespace WorldPackets WorldPacket const* Write() override; - uint32 MailID = 0; - uint32 Command = 0; - uint32 ErrorCode = 0; - uint32 BagResult = 0; - uint32 AttachID = 0; - uint32 QtyInInventory = 0; + uint64 MailID = 0; + int32 Command = 0; + int32 ErrorCode = 0; + int32 BagResult = 0; + uint64 AttachID = 0; + int32 QtyInInventory = 0; }; class MailReturnToSender final : public ClientPacket @@ -146,7 +146,7 @@ namespace WorldPackets void Read() override; - int32 MailID = 0; + uint64 MailID = 0; ObjectGuid SenderGUID; }; @@ -158,7 +158,7 @@ namespace WorldPackets void Read() override; ObjectGuid Mailbox; - int32 MailID = 0; + uint64 MailID = 0; }; class MailDelete final : public ClientPacket @@ -168,7 +168,7 @@ namespace WorldPackets void Read() override; - int32 MailID = 0; + uint64 MailID = 0; int32 DeleteReason = 0; }; @@ -180,8 +180,8 @@ namespace WorldPackets void Read() override; ObjectGuid Mailbox; - int32 MailID = 0; - int32 AttachID = 0; + uint64 MailID = 0; + uint64 AttachID = 0; }; class MailTakeMoney final : public ClientPacket @@ -192,8 +192,8 @@ namespace WorldPackets void Read() override; ObjectGuid Mailbox; - int32 MailID = 0; - int64 Money = 0; + uint64 MailID = 0; + uint64 Money = 0; }; class MailQueryNextMailTime final : public ClientPacket diff --git a/src/server/game/Server/Packets/PerksProgramPacketsCommon.cpp b/src/server/game/Server/Packets/PerksProgramPacketsCommon.cpp new file mode 100644 index 00000000000..32d0d781c94 --- /dev/null +++ b/src/server/game/Server/Packets/PerksProgramPacketsCommon.cpp @@ -0,0 +1,38 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "PerksProgramPacketsCommon.h" + +namespace WorldPackets::PerksProgram +{ +ByteBuffer& operator<<(ByteBuffer& data, PerksVendorItem const& perksVendorItem) +{ + data << int32(perksVendorItem.VendorItemID); + data << int32(perksVendorItem.MountID); + data << int32(perksVendorItem.BattlePetSpeciesID); + data << int32(perksVendorItem.TransmogSetID); + data << int32(perksVendorItem.ItemModifiedAppearanceID); + data << int32(perksVendorItem.Field_14); + data << int32(perksVendorItem.Field_18); + data << int32(perksVendorItem.Price); + data << perksVendorItem.AvailableUntil; + data.WriteBit(perksVendorItem.Disabled); + data.FlushBits(); + + return data; +} +} diff --git a/src/server/game/Server/Packets/PerksProgramPacketsCommon.h b/src/server/game/Server/Packets/PerksProgramPacketsCommon.h new file mode 100644 index 00000000000..7b153218e8b --- /dev/null +++ b/src/server/game/Server/Packets/PerksProgramPacketsCommon.h @@ -0,0 +1,42 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef PerksPorgramPacketsCommon_h__ +#define PerksPorgramPacketsCommon_h__ + +#include "PacketUtilities.h" + +namespace WorldPackets::PerksProgram +{ +struct PerksVendorItem +{ + int32 VendorItemID = 0; + int32 MountID = 0; + int32 BattlePetSpeciesID = 0; + int32 TransmogSetID = 0; + int32 ItemModifiedAppearanceID = 0; + int32 Field_14 = 0; + int32 Field_18 = 0; + int32 Price = 0; + Timestamp<> AvailableUntil; + bool Disabled = false; +}; + +ByteBuffer& operator<<(ByteBuffer& data, PerksVendorItem const& perksVendorItem); +} + +#endif // PerksPorgramPacketsCommon_h__ diff --git a/src/server/game/Server/Packets/QuestPackets.cpp b/src/server/game/Server/Packets/QuestPackets.cpp index 43fd278239f..4ac0d00c1f5 100644 --- a/src/server/game/Server/Packets/QuestPackets.cpp +++ b/src/server/game/Server/Packets/QuestPackets.cpp @@ -45,6 +45,22 @@ void QuestGiverStatusQuery::Read() _worldPacket >> QuestGiverGUID; } +void QuestGiverStatusTrackedQuery::Read() +{ + uint32 guidCount = 0; + _worldPacket >> guidCount; + if (guidCount > 1000) + throw PacketArrayMaxCapacityException(guidCount, 1000); + + QuestGiverGUIDs.reserve(guidCount); + for (uint32 i = 0; i < guidCount; ++i) + { + ObjectGuid guid; + _worldPacket >> guid; + QuestGiverGUIDs.insert(guid); + } +} + WorldPacket const* QuestGiverStatus::Write() { _worldPacket << QuestGiver.Guid; diff --git a/src/server/game/Server/Packets/QuestPackets.h b/src/server/game/Server/Packets/QuestPackets.h index 14c9f25e981..42cdff0f3eb 100644 --- a/src/server/game/Server/Packets/QuestPackets.h +++ b/src/server/game/Server/Packets/QuestPackets.h @@ -49,6 +49,16 @@ namespace WorldPackets void Read() override { } }; + class QuestGiverStatusTrackedQuery final : public ClientPacket + { + public: + QuestGiverStatusTrackedQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_STATUS_TRACKED_QUERY, std::move(packet)) { } + + void Read() override; + + GuidUnorderedSet QuestGiverGUIDs; + }; + struct QuestGiverInfo { QuestGiverInfo() { } diff --git a/src/server/game/Server/Packets/SpellPackets.cpp b/src/server/game/Server/Packets/SpellPackets.cpp index 221a6e5cd96..d3010690bbc 100644 --- a/src/server/game/Server/Packets/SpellPackets.cpp +++ b/src/server/game/Server/Packets/SpellPackets.cpp @@ -907,7 +907,6 @@ void SelfRes::Read() void GetMirrorImageData::Read() { _worldPacket >> UnitGUID; - _worldPacket >> DisplayID; } MirrorImageComponentedData::MirrorImageComponentedData() diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h index 53cfdfddfcd..deb37c81647 100644 --- a/src/server/game/Server/Packets/SpellPackets.h +++ b/src/server/game/Server/Packets/SpellPackets.h @@ -906,7 +906,6 @@ namespace WorldPackets void Read() override; ObjectGuid UnitGUID; - uint32 DisplayID = 0; }; class MirrorImageComponentedData final : public ServerPacket diff --git a/src/server/game/Server/Packets/SystemPackets.cpp b/src/server/game/Server/Packets/SystemPackets.cpp index 5396f9fe141..d71b49eb566 100644 --- a/src/server/game/Server/Packets/SystemPackets.cpp +++ b/src/server/game/Server/Packets/SystemPackets.cpp @@ -52,9 +52,6 @@ WorldPacket const* FeatureSystemStatus::Write() { _worldPacket << uint8(ComplaintStatus); - _worldPacket << uint32(ScrollOfResurrectionRequestsRemaining); - _worldPacket << uint32(ScrollOfResurrectionMaxRequestsPerDay); - _worldPacket << uint32(CfgRealmID); _worldPacket << int32(CfgRealmRecID); @@ -87,14 +84,13 @@ WorldPacket const* FeatureSystemStatus::Write() _worldPacket.WriteBit(VoiceEnabled); _worldPacket.WriteBit(EuropaTicketSystemStatus.has_value()); - _worldPacket.WriteBit(ScrollOfResurrectionEnabled); _worldPacket.WriteBit(BpayStoreEnabled); _worldPacket.WriteBit(BpayStoreAvailable); _worldPacket.WriteBit(BpayStoreDisabledByParentalControls); _worldPacket.WriteBit(ItemRestorationButtonEnabled); _worldPacket.WriteBit(BrowserEnabled); - _worldPacket.WriteBit(SessionAlert.has_value()); + _worldPacket.WriteBit(RAFSystem.Enabled); _worldPacket.WriteBit(RAFSystem.RecruitingEnabled); _worldPacket.WriteBit(CharUndeleteEnabled); @@ -102,8 +98,8 @@ WorldPacket const* FeatureSystemStatus::Write() _worldPacket.WriteBit(CommerceSystemEnabled); _worldPacket.WriteBit(TutorialsEnabled); _worldPacket.WriteBit(TwitterEnabled); - _worldPacket.WriteBit(Unk67); + _worldPacket.WriteBit(WillKickFromWorld); _worldPacket.WriteBit(KioskModeEnabled); _worldPacket.WriteBit(CompetitiveModeEnabled); @@ -111,8 +107,8 @@ WorldPacket const* FeatureSystemStatus::Write() _worldPacket.WriteBit(WarModeFeatureEnabled); _worldPacket.WriteBit(ClubsEnabled); _worldPacket.WriteBit(ClubsBattleNetClubTypeAllowed); - _worldPacket.WriteBit(ClubsCharacterClubTypeAllowed); + _worldPacket.WriteBit(ClubsPresenceUpdateEnabled); _worldPacket.WriteBit(VoiceChatDisabledByParentalControl); _worldPacket.WriteBit(VoiceChatMutedByParentalControl); @@ -120,8 +116,8 @@ WorldPacket const* FeatureSystemStatus::Write() _worldPacket.WriteBit(IsMuted); _worldPacket.WriteBit(ClubFinderEnabled); _worldPacket.WriteBit(Unknown901CheckoutRelated); - _worldPacket.WriteBit(TextToSpeechFeatureEnabled); + _worldPacket.WriteBit(ChatDisabledByDefault); _worldPacket.WriteBit(ChatDisabledByPlayer); _worldPacket.WriteBit(LFGListCustomRequiresAuthenticator); diff --git a/src/server/game/Server/Packets/SystemPackets.h b/src/server/game/Server/Packets/SystemPackets.h index 2091940632f..bd1affa1f6b 100644 --- a/src/server/game/Server/Packets/SystemPackets.h +++ b/src/server/game/Server/Packets/SystemPackets.h @@ -114,10 +114,7 @@ namespace WorldPackets bool BpayStoreAvailable = false; bool BpayStoreEnabled = false; Optional<SessionAlertConfig> SessionAlert; - uint32 ScrollOfResurrectionMaxRequestsPerDay = 0; - bool ScrollOfResurrectionEnabled = false; Optional<EuropaTicketConfig> EuropaTicketSystemStatus; - uint32 ScrollOfResurrectionRequestsRemaining = 0; uint32 CfgRealmID = 0; uint8 ComplaintStatus = 0; int32 CfgRealmRecID = 0; diff --git a/src/server/game/Server/Packets/TicketPackets.h b/src/server/game/Server/Packets/TicketPackets.h index ec2b558dd41..5cece62fa03 100644 --- a/src/server/game/Server/Packets/TicketPackets.h +++ b/src/server/game/Server/Packets/TicketPackets.h @@ -147,7 +147,7 @@ namespace WorldPackets struct SupportTicketMailInfo { - int32 MailID = 0; + int64 MailID = 0; std::string MailSubject; std::string MailBody; }; @@ -259,7 +259,7 @@ namespace WorldPackets uint8 ComplaintType = 0; ComplaintOffender Offender; - uint32 MailID = 0; + uint64 MailID = 0; ComplaintChat Chat; uint64 EventGuid = 0; uint64 InviteGuid = 0; |
