diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-05-04 17:00:52 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-05-04 17:00:52 +0200 |
| commit | 16bc74667e8996b64258718e95b97258dfc0217a (patch) | |
| tree | 20c19a6ecd393c55608f2be2f94a74fab2c1b6f1 /src/server/game/Server/Packets | |
| parent | 64f8693751090bd28e6dc840a2c218c3c609fcf8 (diff) | |
Core: Update to 10.1
Diffstat (limited to 'src/server/game/Server/Packets')
18 files changed, 94 insertions, 92 deletions
diff --git a/src/server/game/Server/Packets/BattlePetPackets.h b/src/server/game/Server/Packets/BattlePetPackets.h index afcfe50f013..164c7b51aa6 100644 --- a/src/server/game/Server/Packets/BattlePetPackets.h +++ b/src/server/game/Server/Packets/BattlePetPackets.h @@ -200,7 +200,7 @@ namespace WorldPackets void Read() override; ObjectGuid PetGuid; - uint32 Flags = 0; + uint16 Flags = 0; uint8 ControlType = 0; }; diff --git a/src/server/game/Server/Packets/BattlegroundPackets.cpp b/src/server/game/Server/Packets/BattlegroundPackets.cpp index 921dd72cde0..08ee119117f 100644 --- a/src/server/game/Server/Packets/BattlegroundPackets.cpp +++ b/src/server/game/Server/Packets/BattlegroundPackets.cpp @@ -116,6 +116,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Battleground::PVPMatchSta if (playerData.MmrChange) data << int32(*playerData.MmrChange); + if (playerData.PostMatchMMR) + data << uint32(*playerData.PostMatchMMR); + return data; } diff --git a/src/server/game/Server/Packets/BattlegroundPackets.h b/src/server/game/Server/Packets/BattlegroundPackets.h index 06d5339f81b..28d337c7698 100644 --- a/src/server/game/Server/Packets/BattlegroundPackets.h +++ b/src/server/game/Server/Packets/BattlegroundPackets.h @@ -135,6 +135,7 @@ namespace WorldPackets Optional<int32> RatingChange; Optional<uint32> PreMatchMMR; Optional<int32> MmrChange; + Optional<uint32> PostMatchMMR; std::vector<PVPMatchPlayerPVPStat> Stats; int32 PrimaryTalentTree = 0; int32 Sex = 0; diff --git a/src/server/game/Server/Packets/CharacterPackets.cpp b/src/server/game/Server/Packets/CharacterPackets.cpp index 210b22f9d18..3d84f568498 100644 --- a/src/server/game/Server/Packets/CharacterPackets.cpp +++ b/src/server/game/Server/Packets/CharacterPackets.cpp @@ -46,7 +46,7 @@ namespace WorldPackets { namespace Character { -void SortCustomizations(Array<ChrCustomizationChoice, 72>& customizations) +void SortCustomizations(Array<ChrCustomizationChoice, 125>& customizations) { auto first = customizations.begin(); auto last = customizations.end(); diff --git a/src/server/game/Server/Packets/CharacterPackets.h b/src/server/game/Server/Packets/CharacterPackets.h index d82c45e87e3..2f04c0add51 100644 --- a/src/server/game/Server/Packets/CharacterPackets.h +++ b/src/server/game/Server/Packets/CharacterPackets.h @@ -60,7 +60,7 @@ namespace WorldPackets uint8 Race = RACE_NONE; uint8 Class = CLASS_NONE; uint8 Sex = GENDER_NONE; - Array<ChrCustomizationChoice, 72> Customizations; + Array<ChrCustomizationChoice, 125> Customizations; Optional<int32> TemplateSet; bool IsTrialBoost = false; bool UseNPE = false; @@ -81,7 +81,7 @@ namespace WorldPackets ObjectGuid CharGUID; uint8 SexID = GENDER_NONE; std::string CharName; - Array<ChrCustomizationChoice, 72> Customizations; + Array<ChrCustomizationChoice, 125> Customizations; }; struct CharRaceOrFactionChangeInfo @@ -92,7 +92,7 @@ namespace WorldPackets ObjectGuid Guid; bool FactionChange = false; std::string Name; - Array<ChrCustomizationChoice, 72> Customizations; + Array<ChrCustomizationChoice, 125> Customizations; }; struct CharacterUndeleteInfo @@ -366,7 +366,7 @@ namespace WorldPackets std::string Name; uint8 SexID = 0; uint8 RaceID = RACE_NONE; - Array<ChrCustomizationChoice, 72> const* Customizations = nullptr; + Array<ChrCustomizationChoice, 125> const* Customizations = nullptr; }; class CharFactionChangeResult final : public ServerPacket @@ -637,7 +637,7 @@ namespace WorldPackets void Read() override; uint8 NewSex = 0; - Array<ChrCustomizationChoice, 72> Customizations; + Array<ChrCustomizationChoice, 125> Customizations; int32 CustomizedRace = 0; }; @@ -744,7 +744,7 @@ namespace WorldPackets ObjectGuid CharGUID; std::string CharName; uint8 SexID = 0; - Array<ChrCustomizationChoice, 72> const& Customizations; + Array<ChrCustomizationChoice, 125> const& Customizations; }; class CharCustomizeFailure final : public ServerPacket diff --git a/src/server/game/Server/Packets/ChatPackets.cpp b/src/server/game/Server/Packets/ChatPackets.cpp index fccac7ce49a..48f1691564f 100644 --- a/src/server/game/Server/Packets/ChatPackets.cpp +++ b/src/server/game/Server/Packets/ChatPackets.cpp @@ -26,6 +26,18 @@ void WorldPackets::Chat::ChatMessage::Read() { _worldPacket >> Language; uint32 len = _worldPacket.ReadBits(11); + switch (GetOpcode()) + { + case CMSG_CHAT_MESSAGE_SAY: + case CMSG_CHAT_MESSAGE_PARTY: + case CMSG_CHAT_MESSAGE_RAID: + case CMSG_CHAT_MESSAGE_RAID_WARNING: + case CMSG_CHAT_MESSAGE_INSTANCE_CHAT: + IsSecure = _worldPacket.ReadBit(); + break; + default: + break; + } Text = _worldPacket.ReadString(len); } @@ -44,6 +56,9 @@ void WorldPackets::Chat::ChatMessageChannel::Read() _worldPacket >> ChannelGUID; uint32 targetLen = _worldPacket.ReadBits(9); uint32 textLen = _worldPacket.ReadBits(11); + if (_worldPacket.ReadBit()) + IsSecure = _worldPacket.ReadBit(); + Target = _worldPacket.ReadString(targetLen); Text = _worldPacket.ReadString(textLen); } @@ -95,7 +110,7 @@ void WorldPackets::Chat::ChatMessageEmote::Read() WorldPackets::Chat::Chat::Chat(Chat const& chat) : ServerPacket(SMSG_CHAT, chat._worldPacket.size()), SlashCmd(chat.SlashCmd), _Language(chat._Language), SenderGUID(chat.SenderGUID), - SenderGuildGUID(chat.SenderGuildGUID), SenderAccountGUID(chat.SenderAccountGUID), TargetGUID(chat.TargetGUID), PartyGUID(chat.PartyGUID), + SenderGuildGUID(chat.SenderGuildGUID), SenderAccountGUID(chat.SenderAccountGUID), TargetGUID(chat.TargetGUID), SenderVirtualAddress(chat.SenderVirtualAddress), TargetVirtualAddress(chat.TargetVirtualAddress), SenderName(chat.SenderName), TargetName(chat.TargetName), Prefix(chat.Prefix), _Channel(chat._Channel), ChatText(chat.ChatText), AchievementID(chat.AchievementID), _ChatFlags(chat._ChatFlags), DisplayTime(chat.DisplayTime), HideChatLog(chat.HideChatLog), FakeSenderName(chat.FakeSenderName) @@ -111,7 +126,6 @@ void WorldPackets::Chat::Chat::Initialize(ChatMsg chatType, Language language, W SenderGUID.Clear(); SenderAccountGUID.Clear(); SenderGuildGUID.Clear(); - PartyGUID.Clear(); TargetGUID.Clear(); SenderName.clear(); TargetName.clear(); @@ -147,9 +161,6 @@ void WorldPackets::Chat::Chat::SetSender(WorldObject const* sender, LocaleConsta _ChatFlags = playerSender->GetChatFlags(); SenderGuildGUID = ObjectGuid::Create<HighGuid::Guild>(playerSender->GetGuildId()); - - if (Group const* group = playerSender->GetGroup()) - PartyGUID = group->GetGUID(); } } @@ -170,9 +181,9 @@ WorldPacket const* WorldPackets::Chat::Chat::Write() _worldPacket << TargetGUID; _worldPacket << uint32(TargetVirtualAddress); _worldPacket << uint32(SenderVirtualAddress); - _worldPacket << PartyGUID; - _worldPacket << uint32(AchievementID); + _worldPacket << int32(AchievementID); _worldPacket << float(DisplayTime); + _worldPacket << int32(SpellID); _worldPacket.WriteBits(SenderName.length(), 11); _worldPacket.WriteBits(TargetName.length(), 11); _worldPacket.WriteBits(Prefix.length(), 5); diff --git a/src/server/game/Server/Packets/ChatPackets.h b/src/server/game/Server/Packets/ChatPackets.h index c4a79438d56..8f03d8aa4b5 100644 --- a/src/server/game/Server/Packets/ChatPackets.h +++ b/src/server/game/Server/Packets/ChatPackets.h @@ -49,6 +49,7 @@ namespace WorldPackets std::string Text; int32 Language = LANG_UNIVERSAL; + bool IsSecure = true; }; // CMSG_CHAT_MESSAGE_WHISPER @@ -76,6 +77,7 @@ namespace WorldPackets ObjectGuid ChannelGUID; std::string Text; std::string Target; + Optional<bool> IsSecure; }; struct ChatAddonMessageParams @@ -163,7 +165,6 @@ namespace WorldPackets ObjectGuid SenderGuildGUID; ObjectGuid SenderAccountGUID; ObjectGuid TargetGUID; - ObjectGuid PartyGUID; uint32 SenderVirtualAddress = 0; uint32 TargetVirtualAddress = 0; std::string SenderName; @@ -172,8 +173,9 @@ namespace WorldPackets std::string _Channel; ///< Channel Name std::string ChatText; uint32 AchievementID = 0; - uint8 _ChatFlags = 0; ///< @see enum ChatFlags + uint16 _ChatFlags = 0; ///< @see enum ChatFlags float DisplayTime = 0.0f; + int32 SpellID = 0; Optional<uint32> Unused_801; bool HideChatLog = false; bool FakeSenderName = false; diff --git a/src/server/game/Server/Packets/CombatLogPackets.cpp b/src/server/game/Server/Packets/CombatLogPackets.cpp index 938c77b40b3..7b2f1c71134 100644 --- a/src/server/game/Server/Packets/CombatLogPackets.cpp +++ b/src/server/game/Server/Packets/CombatLogPackets.cpp @@ -361,7 +361,7 @@ WorldPacket const* WorldPackets::CombatLog::AttackerStateUpdate::Write() attackRoundInfo << int8(ContentTuning.TargetScalingLevelDelta); attackRoundInfo << float(ContentTuning.PlayerItemLevel); attackRoundInfo << float(ContentTuning.TargetItemLevel); - attackRoundInfo << uint16(ContentTuning.ScalingHealthItemLevelCurveID); + attackRoundInfo << uint32(ContentTuning.ScalingHealthItemLevelCurveID); attackRoundInfo << uint32(ContentTuning.Flags); attackRoundInfo << int32(ContentTuning.PlayerContentTuningID); attackRoundInfo << int32(ContentTuning.TargetContentTuningID); diff --git a/src/server/game/Server/Packets/CombatLogPacketsCommon.cpp b/src/server/game/Server/Packets/CombatLogPacketsCommon.cpp index f0ee217503d..acaeacb9b9f 100644 --- a/src/server/game/Server/Packets/CombatLogPacketsCommon.cpp +++ b/src/server/game/Server/Packets/CombatLogPacketsCommon.cpp @@ -171,7 +171,7 @@ ByteBuffer& operator<<(ByteBuffer& data, ContentTuningParams const& contentTunin data << float(contentTuningParams.PlayerItemLevel); data << float(contentTuningParams.TargetItemLevel); data << int16(contentTuningParams.PlayerLevelDelta); - data << uint16(contentTuningParams.ScalingHealthItemLevelCurveID); + data << uint32(contentTuningParams.ScalingHealthItemLevelCurveID); data << uint8(contentTuningParams.TargetLevel); data << uint8(contentTuningParams.Expansion); data << int8(contentTuningParams.TargetScalingLevelDelta); diff --git a/src/server/game/Server/Packets/CombatLogPacketsCommon.h b/src/server/game/Server/Packets/CombatLogPacketsCommon.h index 325338223c2..a5cd2eaa4ef 100644 --- a/src/server/game/Server/Packets/CombatLogPacketsCommon.h +++ b/src/server/game/Server/Packets/CombatLogPacketsCommon.h @@ -69,7 +69,7 @@ namespace WorldPackets int16 PlayerLevelDelta = 0; float PlayerItemLevel = 0; float TargetItemLevel = 0; - uint16 ScalingHealthItemLevelCurveID = 0; + uint32 ScalingHealthItemLevelCurveID = 0; uint8 TargetLevel = 0; uint8 Expansion = 0; int8 TargetScalingLevelDelta = 0; diff --git a/src/server/game/Server/Packets/LootPackets.cpp b/src/server/game/Server/Packets/LootPackets.cpp index 883fa6d4cea..140e8ce6d85 100644 --- a/src/server/game/Server/Packets/LootPackets.cpp +++ b/src/server/game/Server/Packets/LootPackets.cpp @@ -177,6 +177,7 @@ WorldPacket const* WorldPackets::Loot::StartLootRoll::Write() _worldPacket << uint8(ValidRolls); _worldPacket.append(LootRollIneligibleReason.data(), LootRollIneligibleReason.size()); _worldPacket << uint8(Method); + _worldPacket << int32(DungeonEncounterID); _worldPacket << Item; return &_worldPacket; @@ -188,8 +189,10 @@ WorldPacket const* WorldPackets::Loot::LootRollBroadcast::Write() _worldPacket << Player; _worldPacket << int32(Roll); _worldPacket << uint8(RollType); + _worldPacket << int32(DungeonEncounterID); _worldPacket << Item; _worldPacket.WriteBit(Autopassed); + _worldPacket.WriteBit(OffSpec); _worldPacket.FlushBits(); return &_worldPacket; @@ -201,6 +204,7 @@ WorldPacket const* WorldPackets::Loot::LootRollWon::Write() _worldPacket << Winner; _worldPacket << int32(Roll); _worldPacket << uint8(RollType); + _worldPacket << int32(DungeonEncounterID); _worldPacket << Item; _worldPacket.WriteBit(MainSpec); _worldPacket.FlushBits(); @@ -211,6 +215,7 @@ WorldPacket const* WorldPackets::Loot::LootRollWon::Write() WorldPacket const* WorldPackets::Loot::LootAllPassed::Write() { _worldPacket << LootObj; + _worldPacket << int32(DungeonEncounterID); _worldPacket << Item; return &_worldPacket; @@ -220,6 +225,7 @@ WorldPacket const* WorldPackets::Loot::LootRollsComplete::Write() { _worldPacket << LootObj; _worldPacket << uint8(LootListID); + _worldPacket << int32(DungeonEncounterID); return &_worldPacket; } diff --git a/src/server/game/Server/Packets/LootPackets.h b/src/server/game/Server/Packets/LootPackets.h index 6f6f6456f2c..b553c8275cc 100644 --- a/src/server/game/Server/Packets/LootPackets.h +++ b/src/server/game/Server/Packets/LootPackets.h @@ -228,6 +228,7 @@ namespace WorldPackets uint8 ValidRolls = 0; std::array<LootRollIneligibilityReason, 4> LootRollIneligibleReason = { }; LootItemData Item; + int32 DungeonEncounterID = 0; }; class LootRollBroadcast final : public ServerPacket @@ -243,6 +244,8 @@ namespace WorldPackets uint8 RollType = 0; LootItemData Item; bool Autopassed = false; ///< Triggers message |HlootHistory:%d|h[Loot]|h: You automatically passed on: %s because you cannot loot that item. + bool OffSpec = false; + int32 DungeonEncounterID = 0; }; class LootRollWon final : public ServerPacket @@ -258,6 +261,7 @@ namespace WorldPackets uint8 RollType = 0; LootItemData Item; bool MainSpec = false; + int32 DungeonEncounterID = 0; }; class LootAllPassed final : public ServerPacket @@ -269,6 +273,7 @@ namespace WorldPackets ObjectGuid LootObj; LootItemData Item; + int32 DungeonEncounterID = 0; }; class LootRollsComplete final : public ServerPacket @@ -280,6 +285,7 @@ namespace WorldPackets ObjectGuid LootObj; uint8 LootListID = 0; + int32 DungeonEncounterID = 0; }; class MasterLootCandidateList final : public ServerPacket diff --git a/src/server/game/Server/Packets/MiscPackets.cpp b/src/server/game/Server/Packets/MiscPackets.cpp index 9f39f3334ca..9b2eedb8f90 100644 --- a/src/server/game/Server/Packets/MiscPackets.cpp +++ b/src/server/game/Server/Packets/MiscPackets.cpp @@ -64,7 +64,7 @@ WorldPacket const* WorldPackets::Misc::SetCurrency::Write() _worldPacket.WriteBit(QuantityGainSource.has_value()); _worldPacket.WriteBit(QuantityLostSource.has_value()); _worldPacket.WriteBit(FirstCraftOperationID.has_value()); - _worldPacket.WriteBit(LastSpendTime.has_value()); + _worldPacket.WriteBit(NextRechargeTime.has_value()); _worldPacket.FlushBits(); if (WeeklyQuantity) @@ -91,8 +91,11 @@ WorldPacket const* WorldPackets::Misc::SetCurrency::Write() if (FirstCraftOperationID) _worldPacket << uint32(*FirstCraftOperationID); - if (LastSpendTime) - _worldPacket << *LastSpendTime; + if (NextRechargeTime) + _worldPacket << *NextRechargeTime; + + if (RechargeCycleStartTime) + _worldPacket << *RechargeCycleStartTime; return &_worldPacket; } @@ -116,7 +119,8 @@ WorldPacket const* WorldPackets::Misc::SetupCurrency::Write() _worldPacket.WriteBit(data.TrackedQuantity.has_value()); _worldPacket.WriteBit(data.MaxQuantity.has_value()); _worldPacket.WriteBit(data.TotalEarned.has_value()); - _worldPacket.WriteBit(data.LastSpendTime.has_value()); + _worldPacket.WriteBit(data.NextRechargeTime.has_value()); + _worldPacket.WriteBit(data.RechargeCycleStartTime.has_value()); _worldPacket.WriteBits(uint8(data.Flags), 5); _worldPacket.FlushBits(); @@ -130,8 +134,10 @@ WorldPacket const* WorldPackets::Misc::SetupCurrency::Write() _worldPacket << int32(*data.MaxQuantity); if (data.TotalEarned) _worldPacket << int32(*data.TotalEarned); - if (data.LastSpendTime) - _worldPacket << *data.LastSpendTime; + if (data.NextRechargeTime) + _worldPacket << *data.NextRechargeTime; + if (data.RechargeCycleStartTime) + _worldPacket << *data.RechargeCycleStartTime; } return &_worldPacket; @@ -716,10 +722,10 @@ WorldPacket const* WorldPackets::Misc::AccountMountUpdate::Write() _worldPacket.WriteBit(IsFullUpdate); _worldPacket << uint32(Mounts->size()); - for (auto const& spell : *Mounts) + for (auto [spellId, flags] : *Mounts) { - _worldPacket << int32(spell.first); - _worldPacket.WriteBits(spell.second, 2); + _worldPacket << int32(spellId); + _worldPacket.WriteBits(flags, 4); } _worldPacket.FlushBits(); diff --git a/src/server/game/Server/Packets/MiscPackets.h b/src/server/game/Server/Packets/MiscPackets.h index 5f29600d31d..d39bcb26e0a 100644 --- a/src/server/game/Server/Packets/MiscPackets.h +++ b/src/server/game/Server/Packets/MiscPackets.h @@ -113,7 +113,8 @@ namespace WorldPackets Optional<CurrencyGainSource> QuantityGainSource; Optional<CurrencyDestroyReason> QuantityLostSource; Optional<uint32> FirstCraftOperationID; - Optional<Timestamp<>> LastSpendTime; + Optional<Timestamp<>> NextRechargeTime; + Optional<Timestamp<>> RechargeCycleStartTime; bool SuppressChatLog = false; }; @@ -139,7 +140,8 @@ namespace WorldPackets Optional<int32> TrackedQuantity; Optional<int32> MaxQuantity; Optional<int32> TotalEarned; - Optional<Timestamp<>> LastSpendTime; + Optional<Timestamp<>> NextRechargeTime; + Optional<Timestamp<>> RechargeCycleStartTime; uint8 Flags = 0; }; diff --git a/src/server/game/Server/Packets/MovementPackets.cpp b/src/server/game/Server/Packets/MovementPackets.cpp index 391be953ee7..02833e95525 100644 --- a/src/server/game/Server/Packets/MovementPackets.cpp +++ b/src/server/game/Server/Packets/MovementPackets.cpp @@ -30,6 +30,7 @@ ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo) bool hasSpline = false; // todo 6.x send this infos bool hasInertia = movementInfo.inertia.has_value(); bool hasAdvFlying = movementInfo.advFlying.has_value(); + bool hasStandingOnGameObjectGUID = movementInfo.standingOnGameObjectGUID.has_value(); data << movementInfo.guid; data << uint32(movementInfo.flags); @@ -51,6 +52,7 @@ ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo) data << ObjectGuid; }*/ + data.WriteBit(hasStandingOnGameObjectGUID); data.WriteBit(hasTransportData); data.WriteBit(hasFallData); data.WriteBit(hasSpline); @@ -65,6 +67,9 @@ ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo) if (hasTransportData) data << movementInfo.transport; + if (hasStandingOnGameObjectGUID) + data << *movementInfo.standingOnGameObjectGUID; + if (hasInertia) { data << uint32(movementInfo.inertia->id); @@ -121,6 +126,7 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo) data >> guid; } + bool hasStandingOnGameObjectGUID = data.ReadBit(); bool hasTransport = data.ReadBit(); bool hasFall = data.ReadBit(); /*hasSpline = */data.ReadBit(); // todo 6.x read this infos @@ -133,6 +139,9 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo) if (hasTransport) data >> movementInfo.transport; + if (hasStandingOnGameObjectGUID) + data >> movementInfo.standingOnGameObjectGUID.emplace(); + if (hasInertia) { movementInfo.inertia.emplace(); diff --git a/src/server/game/Server/Packets/SpellPackets.cpp b/src/server/game/Server/Packets/SpellPackets.cpp index 72c5b922bc0..ed8239331c8 100644 --- a/src/server/game/Server/Packets/SpellPackets.cpp +++ b/src/server/game/Server/Packets/SpellPackets.cpp @@ -44,21 +44,6 @@ void PetCancelAura::Read() _worldPacket >> SpellID; } -WorldPacket const* CategoryCooldown::Write() -{ - _worldPacket.reserve(4 + 8 * CategoryCooldowns.size()); - - _worldPacket << uint32(CategoryCooldowns.size()); - - for (CategoryCooldownInfo const& cooldown : CategoryCooldowns) - { - _worldPacket << uint32(cooldown.Category); - _worldPacket << int32(cooldown.ModCooldown); - } - - return &_worldPacket; -} - WorldPacket const* SendKnownSpells::Write() { _worldPacket.reserve(1 + 4 * KnownSpells.size() + 4 * FavoriteSpells.size()); @@ -165,13 +150,12 @@ WorldPacket const* AuraUpdate::Write() return &_worldPacket; } -ByteBuffer& operator>>(ByteBuffer& buffer, Optional<TargetLocation>& location) +ByteBuffer& operator>>(ByteBuffer& buffer, TargetLocation& location) { - location.emplace(); - buffer >> location->Transport; - buffer >> location->Location.m_positionX; - buffer >> location->Location.m_positionY; - buffer >> location->Location.m_positionZ; + buffer >> location.Transport; + buffer >> location.Location.m_positionX; + buffer >> location.Location.m_positionY; + buffer >> location.Location.m_positionZ; return buffer; } @@ -190,10 +174,10 @@ ByteBuffer& operator>>(ByteBuffer& buffer, SpellTargetData& targetData) buffer >> targetData.Item; if (hasSrcLocation) - buffer >> targetData.SrcLocation; + buffer >> targetData.SrcLocation.emplace(); if (hasDstLocation) - buffer >> targetData.DstLocation; + buffer >> targetData.DstLocation.emplace(); if (hasOrientation) targetData.Orientation = buffer.read<float>(); @@ -242,6 +226,7 @@ ByteBuffer& operator>>(ByteBuffer& buffer, SpellCastRequest& request) buffer >> request.CraftingNPC; request.OptionalCurrencies.resize(buffer.read<uint32>()); request.OptionalReagents.resize(buffer.read<uint32>()); + request.RemovedModifications.resize(buffer.read<uint32>()); for (SpellExtraCurrencyCost& optionalCurrency : request.OptionalCurrencies) buffer >> optionalCurrency; @@ -258,11 +243,11 @@ ByteBuffer& operator>>(ByteBuffer& buffer, SpellCastRequest& request) for (SpellCraftingReagent& optionalReagent : request.OptionalReagents) buffer >> optionalReagent; + for (SpellCraftingReagent& optionalReagent : request.RemovedModifications) + buffer >> optionalReagent; + if (hasMoveUpdate) - { - request.MoveUpdate.emplace(); - buffer >> *request.MoveUpdate; - } + buffer >> request.MoveUpdate.emplace(); for (SpellWeight& weight : request.Weight) { @@ -997,10 +982,7 @@ void UpdateMissileTrajectory::Read() _worldPacket.ResetBitPos(); if (hasStatus) - { - Status.emplace(); - _worldPacket >> *Status; - } + _worldPacket >> Status.emplace(); } WorldPacket const* SpellDelayed::Write() diff --git a/src/server/game/Server/Packets/SpellPackets.h b/src/server/game/Server/Packets/SpellPackets.h index 3f57ea4f205..6872687f1d1 100644 --- a/src/server/game/Server/Packets/SpellPackets.h +++ b/src/server/game/Server/Packets/SpellPackets.h @@ -103,33 +103,6 @@ namespace WorldPackets uint32 SpellID = 0; }; - class RequestCategoryCooldowns final : public ClientPacket - { - public: - RequestCategoryCooldowns(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_CATEGORY_COOLDOWNS, std::move(packet)) { } - - void Read() override { } - }; - - class CategoryCooldown final : public ServerPacket - { - public: - struct CategoryCooldownInfo - { - CategoryCooldownInfo(uint32 category, int32 cooldown) - : Category(category), ModCooldown(cooldown) { } - - uint32 Category = 0; ///< SpellCategory Id - int32 ModCooldown = 0; ///< Reduced Cooldown in ms - }; - - CategoryCooldown() : ServerPacket(SMSG_CATEGORY_COOLDOWN, 4) { } - - WorldPacket const* Write() override; - - std::vector<CategoryCooldownInfo> CategoryCooldowns; - }; - class SendKnownSpells final : public ServerPacket { public: @@ -274,7 +247,8 @@ namespace WorldPackets MissileTrajectoryRequest MissileTrajectory; Optional<MovementInfo> MoveUpdate; std::vector<SpellWeight> Weight; - Array<SpellCraftingReagent, 3> OptionalReagents; + Array<SpellCraftingReagent, 6> OptionalReagents; + Array<SpellCraftingReagent, 6> RemovedModifications; Array<SpellExtraCurrencyCost, 5 /*MAX_ITEM_EXT_COST_CURRENCIES*/> OptionalCurrencies; Optional<uint64> CraftingOrderID; ObjectGuid CraftingNPC; diff --git a/src/server/game/Server/Packets/TaxiPackets.cpp b/src/server/game/Server/Packets/TaxiPackets.cpp index c0075bc111c..3fe652aa590 100644 --- a/src/server/game/Server/Packets/TaxiPackets.cpp +++ b/src/server/game/Server/Packets/TaxiPackets.cpp @@ -36,8 +36,8 @@ WorldPacket const* WorldPackets::Taxi::ShowTaxiNodes::Write() _worldPacket.WriteBit(WindowInfo.has_value()); _worldPacket.FlushBits(); - _worldPacket << uint32(CanLandNodes.size()); - _worldPacket << uint32(CanUseNodes.size()); + _worldPacket << uint32(CanLandNodes.size() / 8); // client reads this in uint64 blocks, size is ensured to be divisible by 8 in TaxiMask constructor + _worldPacket << uint32(CanUseNodes.size() / 8); // client reads this in uint64 blocks, size is ensured to be divisible by 8 in TaxiMask constructor if (WindowInfo.has_value()) { |
