mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Migration to PacketUtilities bit/string operations part 3
This commit is contained in:
@@ -467,7 +467,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons)
|
||||
else if (plrg->HasAura(9454)) // check Freeze debuff
|
||||
{
|
||||
joinData.result = LFG_JOIN_NO_SLOTS;
|
||||
joinData.playersMissingRequirement.push_back(&plrg->GetName());
|
||||
joinData.playersMissingRequirement.push_back(plrg->GetName());
|
||||
}
|
||||
++memberCount;
|
||||
players.insert(plrg->GetGUID());
|
||||
@@ -817,7 +817,7 @@ void LFGMgr::UpdateRoleCheck(ObjectGuid gguid, ObjectGuid guid /* = ObjectGuid::
|
||||
@param[in] players Set of players to check their dungeon restrictions
|
||||
@param[out] lockMap Map of players Lock status info of given dungeons (Empty if dungeons is not empty)
|
||||
*/
|
||||
void LFGMgr::GetCompatibleDungeons(LfgDungeonSet* dungeons, GuidSet const& players, LfgLockPartyMap* lockMap, std::vector<std::string const*>* playersMissingRequirement, bool isContinue)
|
||||
void LFGMgr::GetCompatibleDungeons(LfgDungeonSet* dungeons, GuidSet const& players, LfgLockPartyMap* lockMap, std::vector<std::string_view>* playersMissingRequirement, bool isContinue)
|
||||
{
|
||||
lockMap->clear();
|
||||
|
||||
@@ -859,7 +859,7 @@ void LFGMgr::GetCompatibleDungeons(LfgDungeonSet* dungeons, GuidSet const& playe
|
||||
dungeonsToRemove.insert(dungeonId);
|
||||
|
||||
(*lockMap)[guid][dungeonId] = it2->second;
|
||||
playersMissingRequirement->push_back(&player->GetName());
|
||||
playersMissingRequirement->push_back(player->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ struct LfgJoinResultData
|
||||
LfgJoinResult result;
|
||||
LfgRoleCheckState state;
|
||||
LfgLockPartyMap lockmap;
|
||||
std::vector<std::string const*> playersMissingRequirement;
|
||||
std::vector<std::string_view> playersMissingRequirement;
|
||||
};
|
||||
|
||||
// Data needed by SMSG_LFG_UPDATE_STATUS
|
||||
@@ -463,7 +463,7 @@ class TC_GAME_API LFGMgr
|
||||
void SetState(ObjectGuid guid, LfgState state);
|
||||
void SetVoteKick(ObjectGuid gguid, bool active);
|
||||
void RemovePlayerData(ObjectGuid guid);
|
||||
void GetCompatibleDungeons(LfgDungeonSet* dungeons, GuidSet const& players, LfgLockPartyMap* lockMap, std::vector<std::string const*>* playersMissingRequirement, bool isContinue);
|
||||
void GetCompatibleDungeons(LfgDungeonSet* dungeons, GuidSet const& players, LfgLockPartyMap* lockMap, std::vector<std::string_view>* playersMissingRequirement, bool isContinue);
|
||||
void _SaveToDB(ObjectGuid guid, uint32 db_guid);
|
||||
LFGDungeonData const* GetLFGDungeon(uint32 id);
|
||||
|
||||
|
||||
@@ -824,7 +824,7 @@ void Group::SendTargetIconList(WorldSession* session) const
|
||||
WorldPackets::Party::SendRaidTargetUpdateAll updateAll;
|
||||
updateAll.PartyIndex = GetGroupCategory();
|
||||
for (uint8 i = 0; i < TARGET_ICONS_COUNT; i++)
|
||||
updateAll.TargetIcons.try_emplace(i, m_targetIcons[i]);
|
||||
updateAll.TargetIcons.emplace_back(i, m_targetIcons[i]);
|
||||
|
||||
session->SendPacket(updateAll.Write());
|
||||
}
|
||||
|
||||
@@ -879,19 +879,19 @@ void WorldSession::HandleSpawnTrackingUpdate(WorldPackets::Quest::SpawnTrackingU
|
||||
{
|
||||
WorldPackets::Quest::QuestPOIUpdateResponse response;
|
||||
|
||||
auto hasObjectTypeRequested = [](TypeMask objectTypeMask, SpawnObjectType objectType) -> bool
|
||||
auto spawnTypeForObjectType = [](TypeMask objectTypeMask) -> SpawnObjectType
|
||||
{
|
||||
if (objectTypeMask & TYPEMASK_UNIT)
|
||||
return objectType == SPAWN_TYPE_CREATURE;
|
||||
else if (objectTypeMask & TYPEMASK_GAMEOBJECT)
|
||||
return objectType == SPAWN_TYPE_GAMEOBJECT;
|
||||
return SPAWN_TYPE_CREATURE;
|
||||
if (objectTypeMask & TYPEMASK_GAMEOBJECT)
|
||||
return SPAWN_TYPE_GAMEOBJECT;
|
||||
|
||||
return false;
|
||||
return NUM_SPAWN_TYPES;
|
||||
};
|
||||
|
||||
for (WorldPackets::Quest::SpawnTrackingRequestInfo const& requestInfo : spawnTrackingUpdate.SpawnTrackingRequests)
|
||||
{
|
||||
WorldPackets::Quest::SpawnTrackingResponseInfo responseInfo;
|
||||
WorldPackets::Quest::SpawnTrackingResponseInfo& responseInfo = response.SpawnTrackingResponses.emplace_back();
|
||||
responseInfo.SpawnTrackingID = requestInfo.SpawnTrackingID;
|
||||
responseInfo.ObjectID = requestInfo.ObjectID;
|
||||
|
||||
@@ -906,7 +906,8 @@ void WorldSession::HandleSpawnTrackingUpdate(WorldPackets::Quest::SpawnTrackingU
|
||||
responseInfo.PhaseUseFlags = spawnTrackingTemplateData->PhaseUseFlags;
|
||||
|
||||
// Send spawn visibility data if available
|
||||
if (requestInfo.ObjectTypeMask && requestInfo.ObjectTypeMask & (TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT))
|
||||
SpawnObjectType spawnType = spawnTypeForObjectType(TypeMask(requestInfo.ObjectTypeMask));
|
||||
if (spawnType != NUM_SPAWN_TYPES)
|
||||
{
|
||||
// There should only be one entity
|
||||
for (auto const& [spawnTrackingId, data] : sObjectMgr->GetSpawnMetadataForSpawnTracking(requestInfo.SpawnTrackingID))
|
||||
@@ -915,10 +916,10 @@ void WorldSession::HandleSpawnTrackingUpdate(WorldPackets::Quest::SpawnTrackingU
|
||||
if (!spawnData)
|
||||
continue;
|
||||
|
||||
if (spawnData->id != (uint32)requestInfo.ObjectID)
|
||||
if (spawnData->id != uint32(requestInfo.ObjectID))
|
||||
continue;
|
||||
|
||||
if (!hasObjectTypeRequested(TypeMask(requestInfo.ObjectTypeMask), data->type))
|
||||
if (spawnType != data->type)
|
||||
continue;
|
||||
|
||||
if (activeQuestObjective)
|
||||
@@ -930,8 +931,6 @@ void WorldSession::HandleSpawnTrackingUpdate(WorldPackets::Quest::SpawnTrackingU
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response.SpawnTrackingResponses.push_back(std::move(responseInfo));
|
||||
}
|
||||
|
||||
SendPacket(response.Write());
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "DisableMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Map.h"
|
||||
#include "MapUtils.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -84,8 +85,8 @@ public:
|
||||
func(summon);
|
||||
|
||||
if (Vehicle const* vehicle = unit->GetVehicleKit())
|
||||
for (auto seat = vehicle->Seats.begin(); seat != vehicle->Seats.end(); ++seat)
|
||||
if (Unit* passenger = ObjectAccessor::GetUnit(*unit, seat->second.Passenger.Guid); passenger && passenger != unit)
|
||||
for (auto const& [_, seat] : vehicle->Seats)
|
||||
if (Unit* passenger = ObjectAccessor::GetUnit(*unit, seat.Passenger.Guid); passenger && passenger != unit)
|
||||
if (_visited.insert(passenger).second)
|
||||
func(passenger);
|
||||
}
|
||||
@@ -315,7 +316,7 @@ void PhasingHandler::OnAreaChange(WorldObject* object)
|
||||
{
|
||||
for (PhaseAreaInfo const& phaseArea : *newAreaPhases)
|
||||
{
|
||||
if (phaseArea.SubAreaExclusions.find(areaId) != phaseArea.SubAreaExclusions.end())
|
||||
if (phaseArea.SubAreaExclusions.contains(areaId))
|
||||
continue;
|
||||
|
||||
uint32 phaseId = phaseArea.PhaseInfo->Id;
|
||||
@@ -492,15 +493,16 @@ void PhasingHandler::SendToPlayer(Player const* player, PhaseShift const& phaseS
|
||||
phaseShiftChange.Client = player->GetGUID();
|
||||
phaseShiftChange.Phaseshift.PhaseShiftFlags = phaseShift.Flags.AsUnderlyingType();
|
||||
phaseShiftChange.Phaseshift.PersonalGUID = phaseShift.PersonalGuid;
|
||||
phaseShiftChange.Phaseshift.Phases.reserve(phaseShift.Phases.size());
|
||||
std::transform(phaseShift.Phases.begin(), phaseShift.Phases.end(), std::back_inserter(phaseShiftChange.Phaseshift.Phases),
|
||||
[](PhaseShift::PhaseRef const& phase) -> WorldPackets::Misc::PhaseShiftDataPhase { return { phase.Flags.AsUnderlyingType(), phase.Id }; });
|
||||
phaseShiftChange.VisibleMapIDs.reserve(phaseShift.VisibleMapIds.size());
|
||||
std::transform(phaseShift.VisibleMapIds.begin(), phaseShift.VisibleMapIds.end(), std::back_inserter(phaseShiftChange.VisibleMapIDs),
|
||||
[](PhaseShift::VisibleMapIdContainer::value_type const& visibleMapId) { return visibleMapId.first; });
|
||||
phaseShiftChange.UiMapPhaseIDs.reserve(phaseShift.UiMapPhaseIds.size());
|
||||
std::transform(phaseShift.UiMapPhaseIds.begin(), phaseShift.UiMapPhaseIds.end(), std::back_inserter(phaseShiftChange.UiMapPhaseIDs),
|
||||
[](PhaseShift::UiMapPhaseIdContainer::value_type const& uiWorldMapAreaIdSwap) { return uiWorldMapAreaIdSwap.first; });
|
||||
|
||||
phaseShiftChange.Phaseshift.Phases.resize(phaseShift.Phases.size());
|
||||
std::ranges::transform(phaseShift.Phases, phaseShiftChange.Phaseshift.Phases.begin(),
|
||||
[](PhaseShift::PhaseRef const& phase) { return WorldPackets::Misc::PhaseShiftDataPhase{ .PhaseFlags = phase.Flags.AsUnderlyingType(), .Id = phase.Id }; });
|
||||
|
||||
phaseShiftChange.VisibleMapIDs.resize(phaseShift.VisibleMapIds.size());
|
||||
std::ranges::transform(phaseShift.VisibleMapIds, phaseShiftChange.VisibleMapIDs.begin(), Trinity::Containers::MapKey);
|
||||
|
||||
phaseShiftChange.UiMapPhaseIDs.resize(phaseShift.UiMapPhaseIds.size());
|
||||
std::ranges::transform(phaseShift.UiMapPhaseIds, phaseShiftChange.UiMapPhaseIDs.begin(), Trinity::Containers::MapKey);
|
||||
|
||||
player->SendDirectMessage(phaseShiftChange.Write());
|
||||
}
|
||||
@@ -514,9 +516,9 @@ void PhasingHandler::FillPartyMemberPhase(WorldPackets::Party::PartyMemberPhaseS
|
||||
{
|
||||
partyMemberPhases->PhaseShiftFlags = phaseShift.Flags.AsUnderlyingType();
|
||||
partyMemberPhases->PersonalGUID = phaseShift.PersonalGuid;
|
||||
partyMemberPhases->List.reserve(phaseShift.Phases.size());
|
||||
std::transform(phaseShift.Phases.begin(), phaseShift.Phases.end(), std::back_inserter(partyMemberPhases->List),
|
||||
[](PhaseShift::PhaseRef const& phase) -> WorldPackets::Party::PartyMemberPhase { return { phase.Flags.AsUnderlyingType(), phase.Id }; });
|
||||
partyMemberPhases->List.resize(phaseShift.Phases.size());
|
||||
std::ranges::transform(phaseShift.Phases, partyMemberPhases->List.begin(),
|
||||
[](PhaseShift::PhaseRef const& phase) { return WorldPackets::Party::PartyMemberPhase{ .Flags = phase.Flags.AsUnderlyingType(), .Id = phase.Id }; });
|
||||
}
|
||||
|
||||
PhaseShift const& PhasingHandler::GetEmptyPhaseShift()
|
||||
@@ -678,7 +680,7 @@ std::string PhasingHandler::FormatPhases(PhaseShift const& phaseShift)
|
||||
for (PhaseShift::PhaseRef const& phase : phaseShift.Phases)
|
||||
phases << phase.Id << ',';
|
||||
|
||||
return phases.str();
|
||||
return std::move(phases).str();
|
||||
}
|
||||
|
||||
bool PhasingHandler::IsPersonalPhase(uint32 phaseId)
|
||||
|
||||
@@ -338,7 +338,7 @@ void ReputationMgr::SendState(FactionState const* faction)
|
||||
};
|
||||
|
||||
if (faction)
|
||||
setFactionStanding.Faction.emplace_back(int32(faction->ReputationListID), getStandingForPacket(faction));
|
||||
setFactionStanding.Faction.emplace_back(int32(faction->ReputationListID), getStandingForPacket(faction), faction->ID);
|
||||
|
||||
for (auto& [reputationIndex, state] : _factions)
|
||||
{
|
||||
@@ -346,7 +346,7 @@ void ReputationMgr::SendState(FactionState const* faction)
|
||||
{
|
||||
state.needSend = false;
|
||||
if (!faction || state.ReputationListID != faction->ReputationListID)
|
||||
setFactionStanding.Faction.emplace_back(int32(state.ReputationListID), getStandingForPacket(&state));
|
||||
setFactionStanding.Faction.emplace_back(int32(state.ReputationListID), getStandingForPacket(&state), faction->ID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,13 +155,15 @@ WorldPacket const* QueryBattlePetNameResponse::Write()
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
_worldPacket << SizedString::BitsSize<7>(DeclinedNames.name[i]);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
_worldPacket << SizedString::Data(DeclinedNames.name[i]);
|
||||
|
||||
_worldPacket << SizedString::Data(Name);
|
||||
}
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
else
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -114,11 +114,13 @@ WorldPacket const* RaidInstanceMessage::Write()
|
||||
_worldPacket << uint32(MapID);
|
||||
_worldPacket << uint32(DifficultyID);
|
||||
_worldPacket << int32(TimeLeft);
|
||||
_worldPacket << BitsSize<8>(WarningMessage);
|
||||
_worldPacket << SizedString::BitsSize<8>(WarningMessage);
|
||||
_worldPacket << Bits<1>(Locked);
|
||||
_worldPacket << Bits<1>(Extended);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << SizedString::Data(WarningMessage);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,14 @@ namespace WorldPackets::LFG
|
||||
{
|
||||
void DFJoin::Read()
|
||||
{
|
||||
QueueAsGroup = _worldPacket.ReadBit();
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
Mercenary = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(QueueAsGroup);
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Bits<1>(Mercenary);
|
||||
_worldPacket >> Roles;
|
||||
Slots.resize(_worldPacket.read<uint32>());
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> Size<uint32>(Slots);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
|
||||
for (uint32& slot : Slots)
|
||||
_worldPacket >> slot;
|
||||
}
|
||||
@@ -42,32 +43,33 @@ void DFProposalResponse::Read()
|
||||
_worldPacket >> Ticket;
|
||||
_worldPacket >> InstanceID;
|
||||
_worldPacket >> ProposalID;
|
||||
Accepted = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Accepted);
|
||||
}
|
||||
|
||||
void DFSetRoles::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> RolesDesired;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void DFBootPlayerVote::Read()
|
||||
{
|
||||
Vote = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Vote);
|
||||
}
|
||||
|
||||
void DFTeleport::Read()
|
||||
{
|
||||
TeleportOut = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(TeleportOut);
|
||||
}
|
||||
|
||||
void DFGetSystemInfo::Read()
|
||||
{
|
||||
Player = _worldPacket.ReadBit();
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> Bits<1>(Player);
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, LFGBlackListSlot const& lfgBlackListSlot)
|
||||
@@ -83,8 +85,8 @@ ByteBuffer& operator<<(ByteBuffer& data, LFGBlackListSlot const& lfgBlackListSlo
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, LFGBlackList const& blackList)
|
||||
{
|
||||
data.WriteBit(blackList.PlayerGuid.has_value());
|
||||
data << uint32(blackList.Slot.size());
|
||||
data << OptionalInit(blackList.PlayerGuid);
|
||||
data << Size<uint32>(blackList.Slot);
|
||||
if (blackList.PlayerGuid)
|
||||
data << *blackList.PlayerGuid;
|
||||
|
||||
@@ -115,9 +117,9 @@ ByteBuffer& operator<<(ByteBuffer& data, LfgPlayerQuestReward const& playerQuest
|
||||
data << uint8(playerQuestReward.Mask);
|
||||
data << int32(playerQuestReward.RewardMoney);
|
||||
data << int32(playerQuestReward.RewardXP);
|
||||
data << uint32(playerQuestReward.Item.size());
|
||||
data << uint32(playerQuestReward.Currency.size());
|
||||
data << uint32(playerQuestReward.BonusCurrency.size());
|
||||
data << Size<uint32>(playerQuestReward.Item);
|
||||
data << Size<uint32>(playerQuestReward.Currency);
|
||||
data << Size<uint32>(playerQuestReward.BonusCurrency);
|
||||
|
||||
for (LfgPlayerQuestRewardItem const& item : playerQuestReward.Item)
|
||||
data << item;
|
||||
@@ -128,10 +130,10 @@ ByteBuffer& operator<<(ByteBuffer& data, LfgPlayerQuestReward const& playerQuest
|
||||
for (LfgPlayerQuestRewardCurrency const& bonusCurrency : playerQuestReward.BonusCurrency)
|
||||
data << bonusCurrency;
|
||||
|
||||
data.WriteBit(playerQuestReward.RewardSpellID.has_value());
|
||||
data.WriteBit(playerQuestReward.ArtifactXPCategory.has_value());
|
||||
data.WriteBit(playerQuestReward.ArtifactXP.has_value());
|
||||
data.WriteBit(playerQuestReward.Honor.has_value());
|
||||
data << OptionalInit(playerQuestReward.RewardSpellID);
|
||||
data << OptionalInit(playerQuestReward.ArtifactXPCategory);
|
||||
data << OptionalInit(playerQuestReward.ArtifactXP);
|
||||
data << OptionalInit(playerQuestReward.Honor);
|
||||
data.FlushBits();
|
||||
|
||||
if (playerQuestReward.RewardSpellID)
|
||||
@@ -166,9 +168,9 @@ ByteBuffer& operator<<(ByteBuffer& data, LfgPlayerDungeonInfo const& playerDunge
|
||||
data << int32(playerDungeonInfo.Quantity);
|
||||
data << uint32(playerDungeonInfo.CompletedMask);
|
||||
data << uint32(playerDungeonInfo.EncounterMask);
|
||||
data << uint32(playerDungeonInfo.ShortageReward.size());
|
||||
data.WriteBit(playerDungeonInfo.FirstReward);
|
||||
data.WriteBit(playerDungeonInfo.ShortageEligible);
|
||||
data << Size<uint32>(playerDungeonInfo.ShortageReward);
|
||||
data << Bits<1>(playerDungeonInfo.FirstReward);
|
||||
data << Bits<1>(playerDungeonInfo.ShortageEligible);
|
||||
data.FlushBits();
|
||||
|
||||
data << playerDungeonInfo.Rewards;
|
||||
@@ -180,7 +182,7 @@ ByteBuffer& operator<<(ByteBuffer& data, LfgPlayerDungeonInfo const& playerDunge
|
||||
|
||||
WorldPacket const* LfgPlayerInfo::Write()
|
||||
{
|
||||
_worldPacket << uint32(Dungeon.size());
|
||||
_worldPacket << Size<uint32>(Dungeon);
|
||||
_worldPacket << BlackList;
|
||||
for (LfgPlayerDungeonInfo const& playerDungeonInfo : Dungeon)
|
||||
_worldPacket << playerDungeonInfo;
|
||||
@@ -190,7 +192,7 @@ WorldPacket const* LfgPlayerInfo::Write()
|
||||
|
||||
WorldPacket const* LfgPartyInfo::Write()
|
||||
{
|
||||
_worldPacket << uint32(Player.size());
|
||||
_worldPacket << Size<uint32>(Player);
|
||||
for (LFGBlackList const& player : Player)
|
||||
_worldPacket << player;
|
||||
|
||||
@@ -202,9 +204,9 @@ WorldPacket const* LFGUpdateStatus::Write()
|
||||
_worldPacket << Ticket;
|
||||
_worldPacket << uint8(SubType);
|
||||
_worldPacket << uint8(Reason);
|
||||
_worldPacket << uint32(Slots.size());
|
||||
_worldPacket << Size<uint32>(Slots);
|
||||
_worldPacket << uint8(RequestedRoles);
|
||||
_worldPacket << uint32(SuspendedPlayers.size());
|
||||
_worldPacket << Size<uint32>(SuspendedPlayers);
|
||||
_worldPacket << uint32(QueueMapID);
|
||||
|
||||
for (uint32 slot : Slots)
|
||||
@@ -213,12 +215,12 @@ WorldPacket const* LFGUpdateStatus::Write()
|
||||
for (ObjectGuid const& suspendedPlayer : SuspendedPlayers)
|
||||
_worldPacket << suspendedPlayer;
|
||||
|
||||
_worldPacket.WriteBit(IsParty);
|
||||
_worldPacket.WriteBit(NotifyUI);
|
||||
_worldPacket.WriteBit(Joined);
|
||||
_worldPacket.WriteBit(LfgJoined);
|
||||
_worldPacket.WriteBit(Queued);
|
||||
_worldPacket.WriteBit(Brawl);
|
||||
_worldPacket << Bits<1>(IsParty);
|
||||
_worldPacket << Bits<1>(NotifyUI);
|
||||
_worldPacket << Bits<1>(Joined);
|
||||
_worldPacket << Bits<1>(LfgJoined);
|
||||
_worldPacket << Bits<1>(Queued);
|
||||
_worldPacket << Bits<1>(Brawl);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -228,7 +230,7 @@ WorldPacket const* RoleChosen::Write()
|
||||
{
|
||||
_worldPacket << Player;
|
||||
_worldPacket << uint8(RoleMask);
|
||||
_worldPacket.WriteBit(Accepted);
|
||||
_worldPacket << Bits<1>(Accepted);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -239,7 +241,7 @@ ByteBuffer& operator<<(ByteBuffer& data, LFGRoleCheckUpdateMember const& lfgRole
|
||||
data << lfgRoleCheckUpdateMember.Guid;
|
||||
data << uint8(lfgRoleCheckUpdateMember.RolesDesired);
|
||||
data << uint8(lfgRoleCheckUpdateMember.Level);
|
||||
data.WriteBit(lfgRoleCheckUpdateMember.RoleCheckComplete);
|
||||
data << Bits<1>(lfgRoleCheckUpdateMember.RoleCheckComplete);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
@@ -249,10 +251,10 @@ WorldPacket const* LFGRoleCheckUpdate::Write()
|
||||
{
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
_worldPacket << uint8(RoleCheckStatus);
|
||||
_worldPacket << uint32(JoinSlots.size());
|
||||
_worldPacket << uint32(BgQueueIDs.size());
|
||||
_worldPacket << Size<uint32>(JoinSlots);
|
||||
_worldPacket << Size<uint32>(BgQueueIDs);
|
||||
_worldPacket << int32(GroupFinderActivityID);
|
||||
_worldPacket << uint32(Members.size());
|
||||
_worldPacket << Size<uint32>(Members);
|
||||
|
||||
for (uint32 slot : JoinSlots)
|
||||
_worldPacket << uint32(slot);
|
||||
@@ -260,8 +262,8 @@ WorldPacket const* LFGRoleCheckUpdate::Write()
|
||||
for (uint64 bgQueueID : BgQueueIDs)
|
||||
_worldPacket << uint64(bgQueueID);
|
||||
|
||||
_worldPacket.WriteBit(IsBeginning);
|
||||
_worldPacket.WriteBit(IsRequeue);
|
||||
_worldPacket << Bits<1>(IsBeginning);
|
||||
_worldPacket << Bits<1>(IsRequeue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (LFGRoleCheckUpdateMember const& member : Members)
|
||||
@@ -275,18 +277,17 @@ WorldPacket const* LFGJoinResult::Write()
|
||||
_worldPacket << Ticket;
|
||||
_worldPacket << int32(Result);
|
||||
_worldPacket << uint8(ResultDetail);
|
||||
_worldPacket << uint32(BlackList.size());
|
||||
_worldPacket << uint32(BlackListNames.size());
|
||||
_worldPacket << Size<uint32>(BlackList);
|
||||
_worldPacket << Size<uint32>(BlackListNames);
|
||||
|
||||
for (LFGBlackList const& blackList : BlackList)
|
||||
_worldPacket << blackList;
|
||||
|
||||
for (std::string const* str : BlackListNames)
|
||||
_worldPacket.WriteBits(str->length() + 1, 24);
|
||||
for (std::string_view const& str : BlackListNames)
|
||||
_worldPacket << SizedCString::BitsSize<24>(str);
|
||||
|
||||
for (std::string const* str : BlackListNames)
|
||||
if (!str->empty())
|
||||
_worldPacket << *str;
|
||||
for (std::string_view const& str : BlackListNames)
|
||||
_worldPacket << SizedCString::Data(str);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -310,8 +311,8 @@ WorldPacket const* LFGQueueStatus::Write()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, LFGPlayerRewards const& lfgPlayerRewards)
|
||||
{
|
||||
data.WriteBit(lfgPlayerRewards.RewardItem.has_value());
|
||||
data.WriteBit(lfgPlayerRewards.RewardCurrency.has_value());
|
||||
data << OptionalInit(lfgPlayerRewards.RewardItem);
|
||||
data << OptionalInit(lfgPlayerRewards.RewardCurrency);
|
||||
if (lfgPlayerRewards.RewardItem)
|
||||
data << *lfgPlayerRewards.RewardItem;
|
||||
|
||||
@@ -329,7 +330,7 @@ WorldPacket const* LFGPlayerReward::Write()
|
||||
_worldPacket << uint32(ActualSlot);
|
||||
_worldPacket << int32(RewardMoney);
|
||||
_worldPacket << int32(AddedXP);
|
||||
_worldPacket << uint32(Rewards.size());
|
||||
_worldPacket << Size<uint32>(Rewards);
|
||||
|
||||
for (LFGPlayerRewards const& reward : Rewards)
|
||||
_worldPacket << reward;
|
||||
@@ -364,11 +365,11 @@ WorldPacket const* LfgBootPlayer::Write()
|
||||
ByteBuffer& operator<<(ByteBuffer& data, LFGProposalUpdatePlayer const& lfgProposalUpdatePlayer)
|
||||
{
|
||||
data << uint8(lfgProposalUpdatePlayer.Roles);
|
||||
data.WriteBit(lfgProposalUpdatePlayer.Me);
|
||||
data.WriteBit(lfgProposalUpdatePlayer.SameParty);
|
||||
data.WriteBit(lfgProposalUpdatePlayer.MyParty);
|
||||
data.WriteBit(lfgProposalUpdatePlayer.Responded);
|
||||
data.WriteBit(lfgProposalUpdatePlayer.Accepted);
|
||||
data << Bits<1>(lfgProposalUpdatePlayer.Me);
|
||||
data << Bits<1>(lfgProposalUpdatePlayer.SameParty);
|
||||
data << Bits<1>(lfgProposalUpdatePlayer.MyParty);
|
||||
data << Bits<1>(lfgProposalUpdatePlayer.Responded);
|
||||
data << Bits<1>(lfgProposalUpdatePlayer.Accepted);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
@@ -383,11 +384,11 @@ WorldPacket const* LFGProposalUpdate::Write()
|
||||
_worldPacket << int8(State);
|
||||
_worldPacket << uint32(CompletedMask);
|
||||
_worldPacket << uint32(EncounterMask);
|
||||
_worldPacket << uint32(Players.size());
|
||||
_worldPacket << Size<uint32>(Players);
|
||||
_worldPacket << uint8(PromisedShortageRolePriority);
|
||||
_worldPacket.WriteBit(ValidCompletedMask);
|
||||
_worldPacket.WriteBit(ProposalSilent);
|
||||
_worldPacket.WriteBit(FailedByMyParty);
|
||||
_worldPacket << Bits<1>(ValidCompletedMask);
|
||||
_worldPacket << Bits<1>(ProposalSilent);
|
||||
_worldPacket << Bits<1>(FailedByMyParty);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (LFGProposalUpdatePlayer const& player : Players)
|
||||
@@ -405,7 +406,7 @@ WorldPacket const* LFGOfferContinue::Write()
|
||||
|
||||
WorldPacket const* LFGTeleportDenied::Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Reason, 4);
|
||||
_worldPacket << Bits<4>(Reason);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LFGPackets_h__
|
||||
#define LFGPackets_h__
|
||||
#ifndef TRINITYCORE_LFG_PACKETS_H
|
||||
#define TRINITYCORE_LFG_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "PacketUtilities.h"
|
||||
@@ -36,7 +36,7 @@ namespace WorldPackets
|
||||
class DFJoin final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFJoin(WorldPacket&& packet) : ClientPacket(CMSG_DF_JOIN, std::move(packet)) { }
|
||||
explicit DFJoin(WorldPacket&& packet) : ClientPacket(CMSG_DF_JOIN, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace WorldPackets
|
||||
class DFLeave final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFLeave(WorldPacket&& packet) : ClientPacket(CMSG_DF_LEAVE, std::move(packet)) { }
|
||||
explicit DFLeave(WorldPacket&& packet) : ClientPacket(CMSG_DF_LEAVE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace WorldPackets
|
||||
class DFProposalResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFProposalResponse(WorldPacket&& packet) : ClientPacket(CMSG_DF_PROPOSAL_RESPONSE, std::move(packet)) { }
|
||||
explicit DFProposalResponse(WorldPacket&& packet) : ClientPacket(CMSG_DF_PROPOSAL_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace WorldPackets
|
||||
class DFSetRoles final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFSetRoles(WorldPacket&& packet) : ClientPacket(CMSG_DF_SET_ROLES, std::move(packet)) { }
|
||||
explicit DFSetRoles(WorldPacket&& packet) : ClientPacket(CMSG_DF_SET_ROLES, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace WorldPackets
|
||||
class DFBootPlayerVote final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFBootPlayerVote(WorldPacket&& packet) : ClientPacket(CMSG_DF_BOOT_PLAYER_VOTE, std::move(packet)) { }
|
||||
explicit DFBootPlayerVote(WorldPacket&& packet) : ClientPacket(CMSG_DF_BOOT_PLAYER_VOTE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace WorldPackets
|
||||
class DFTeleport final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFTeleport(WorldPacket&& packet) : ClientPacket(CMSG_DF_TELEPORT, std::move(packet)) { }
|
||||
explicit DFTeleport(WorldPacket&& packet) : ClientPacket(CMSG_DF_TELEPORT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace WorldPackets
|
||||
class DFGetSystemInfo final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFGetSystemInfo(WorldPacket&& packet) : ClientPacket(CMSG_DF_GET_SYSTEM_INFO, std::move(packet)) { }
|
||||
explicit DFGetSystemInfo(WorldPacket&& packet) : ClientPacket(CMSG_DF_GET_SYSTEM_INFO, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace WorldPackets
|
||||
class DFGetJoinStatus final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DFGetJoinStatus(WorldPacket&& packet) : ClientPacket(CMSG_DF_GET_JOIN_STATUS, std::move(packet)) { }
|
||||
explicit DFGetJoinStatus(WorldPacket&& packet) : ClientPacket(CMSG_DF_GET_JOIN_STATUS, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -197,7 +197,7 @@ namespace WorldPackets
|
||||
class LfgPlayerInfo final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LfgPlayerInfo() : ServerPacket(SMSG_LFG_PLAYER_INFO) { }
|
||||
explicit LfgPlayerInfo() : ServerPacket(SMSG_LFG_PLAYER_INFO) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace WorldPackets
|
||||
class LfgPartyInfo final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LfgPartyInfo() : ServerPacket(SMSG_LFG_PARTY_INFO) { }
|
||||
explicit LfgPartyInfo() : ServerPacket(SMSG_LFG_PARTY_INFO) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace WorldPackets
|
||||
class LFGUpdateStatus final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGUpdateStatus() : ServerPacket(SMSG_LFG_UPDATE_STATUS) { }
|
||||
explicit LFGUpdateStatus() : ServerPacket(SMSG_LFG_UPDATE_STATUS) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace WorldPackets
|
||||
class RoleChosen final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RoleChosen() : ServerPacket(SMSG_ROLE_CHOSEN, 16 + 4 + 1) { }
|
||||
explicit RoleChosen() : ServerPacket(SMSG_ROLE_CHOSEN, 16 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace WorldPackets
|
||||
class LFGRoleCheckUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGRoleCheckUpdate() : ServerPacket(SMSG_LFG_ROLE_CHECK_UPDATE) { }
|
||||
explicit LFGRoleCheckUpdate() : ServerPacket(SMSG_LFG_ROLE_CHECK_UPDATE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -281,7 +281,7 @@ namespace WorldPackets
|
||||
class LFGJoinResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGJoinResult() : ServerPacket(SMSG_LFG_JOIN_RESULT) { }
|
||||
explicit LFGJoinResult() : ServerPacket(SMSG_LFG_JOIN_RESULT) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -289,13 +289,13 @@ namespace WorldPackets
|
||||
int32 Result = 0;
|
||||
uint8 ResultDetail = 0;
|
||||
std::vector<LFGBlackList> BlackList;
|
||||
std::vector<std::string const*> BlackListNames;
|
||||
std::vector<std::string_view> BlackListNames;
|
||||
};
|
||||
|
||||
class LFGQueueStatus final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGQueueStatus() : ServerPacket(SMSG_LFG_QUEUE_STATUS, 16 + 4 + 4 + 4 + 4 + 4 + 4 + 4 * 3 + 3 + 4) { }
|
||||
explicit LFGQueueStatus() : ServerPacket(SMSG_LFG_QUEUE_STATUS, 16 + 4 + 4 + 4 + 4 + 4 + 4 + 4 * 3 + 3 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -334,7 +334,7 @@ namespace WorldPackets
|
||||
class LFGPlayerReward final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGPlayerReward() : ServerPacket(SMSG_LFG_PLAYER_REWARD) { }
|
||||
explicit LFGPlayerReward() : ServerPacket(SMSG_LFG_PLAYER_REWARD) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -362,7 +362,7 @@ namespace WorldPackets
|
||||
class LfgBootPlayer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LfgBootPlayer() : ServerPacket(SMSG_LFG_BOOT_PLAYER) { }
|
||||
explicit LfgBootPlayer() : ServerPacket(SMSG_LFG_BOOT_PLAYER) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace WorldPackets
|
||||
class LFGProposalUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGProposalUpdate() : ServerPacket(SMSG_LFG_PROPOSAL_UPDATE) { }
|
||||
explicit LFGProposalUpdate() : ServerPacket(SMSG_LFG_PROPOSAL_UPDATE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace WorldPackets
|
||||
class LFGDisabled final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGDisabled() : ServerPacket(SMSG_LFG_DISABLED, 0) { }
|
||||
explicit LFGDisabled() : ServerPacket(SMSG_LFG_DISABLED, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
@@ -411,7 +411,7 @@ namespace WorldPackets
|
||||
class LFGOfferContinue final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGOfferContinue(uint32 slot) : ServerPacket(SMSG_LFG_OFFER_CONTINUE, 4), Slot(slot) { }
|
||||
explicit LFGOfferContinue(uint32 slot) : ServerPacket(SMSG_LFG_OFFER_CONTINUE, 4), Slot(slot) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace WorldPackets
|
||||
class LFGTeleportDenied final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LFGTeleportDenied(lfg::LfgTeleportResult reason) : ServerPacket(SMSG_LFG_TELEPORT_DENIED, 1), Reason(reason) { }
|
||||
explicit LFGTeleportDenied(lfg::LfgTeleportResult reason) : ServerPacket(SMSG_LFG_TELEPORT_DENIED, 1), Reason(reason) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -430,4 +430,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LFGPackets_h__
|
||||
#endif // TRINITYCORE_LFG_PACKETS_H
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LFGPacketsCommon_h__
|
||||
#define LFGPacketsCommon_h__
|
||||
#ifndef TRINITYCORE_LFG_PACKETS_COMMON_H
|
||||
#define TRINITYCORE_LFG_PACKETS_COMMON_H
|
||||
|
||||
#include "ObjectGuid.h"
|
||||
#include "PacketUtilities.h"
|
||||
@@ -46,4 +46,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LFGPacketsCommon_h__
|
||||
#endif // TRINITYCORE_LFG_PACKETS_COMMON_H
|
||||
|
||||
@@ -29,6 +29,7 @@ static ByteBuffer& operator<<(ByteBuffer& data, LootItemData const& lootItem)
|
||||
data << uint32(lootItem.Quantity);
|
||||
data << uint8(lootItem.LootItemType);
|
||||
data << uint8(lootItem.LootListID);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -39,6 +40,7 @@ static ByteBuffer& operator<<(ByteBuffer& data, LootCurrency const& lootCurrency
|
||||
data << uint8(lootCurrency.LootListID);
|
||||
data << Bits<3>(lootCurrency.UIType);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -56,8 +58,8 @@ WorldPacket const* LootResponse::Write()
|
||||
_worldPacket << uint8(_LootMethod);
|
||||
_worldPacket << uint8(Threshold);
|
||||
_worldPacket << uint32(Coins);
|
||||
_worldPacket << uint32(Items.size());
|
||||
_worldPacket << uint32(Currencies.size());
|
||||
_worldPacket << Size<uint32>(Items);
|
||||
_worldPacket << Size<uint32>(Currencies);
|
||||
_worldPacket << Bits<1>(Acquired);
|
||||
_worldPacket << Bits<1>(AELooting);
|
||||
_worldPacket << Bits<1>(SuppressError);
|
||||
@@ -74,14 +76,12 @@ WorldPacket const* LootResponse::Write()
|
||||
|
||||
void LootItem::Read()
|
||||
{
|
||||
uint32 Count;
|
||||
_worldPacket >> Count;
|
||||
_worldPacket >> Size<uint32>(Loot);
|
||||
|
||||
Loot.resize(Count);
|
||||
for (uint32 i = 0; i < Count; ++i)
|
||||
for (LootRequest& lootRequest : Loot)
|
||||
{
|
||||
_worldPacket >> Loot[i].Object;
|
||||
_worldPacket >> Loot[i].LootListID;
|
||||
_worldPacket >> lootRequest.Object;
|
||||
_worldPacket >> lootRequest.LootListID;
|
||||
}
|
||||
|
||||
_worldPacket >> Bits<1>(IsSoftInteract);
|
||||
@@ -89,15 +89,13 @@ void LootItem::Read()
|
||||
|
||||
void MasterLootItem::Read()
|
||||
{
|
||||
uint32 Count;
|
||||
_worldPacket >> Count;
|
||||
_worldPacket >> Size<uint32>(Loot);
|
||||
_worldPacket >> Target;
|
||||
|
||||
Loot.resize(Count);
|
||||
for (uint32 i = 0; i < Count; ++i)
|
||||
for (LootRequest& lootRequest : Loot)
|
||||
{
|
||||
_worldPacket >> Loot[i].Object;
|
||||
_worldPacket >> Loot[i].LootListID;
|
||||
_worldPacket >> lootRequest.Object;
|
||||
_worldPacket >> lootRequest.LootListID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +238,7 @@ WorldPacket const* LootRollsComplete::Write()
|
||||
WorldPacket const* MasterLootCandidateList::Write()
|
||||
{
|
||||
_worldPacket << LootObj;
|
||||
_worldPacket << uint32(Players.size());
|
||||
_worldPacket << Size<uint32>(Players);
|
||||
for (ObjectGuid const& player : Players)
|
||||
_worldPacket << player;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LootPackets_h__
|
||||
#define LootPackets_h__
|
||||
#ifndef TRINITYCORE_LOOT_PACKETS_H
|
||||
#define TRINITYCORE_LOOT_PACKETS_H
|
||||
|
||||
#include "ItemPacketsCommon.h"
|
||||
#include "LootItemType.h"
|
||||
@@ -32,7 +32,7 @@ namespace WorldPackets
|
||||
class LootUnit final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
LootUnit(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_UNIT, std::move(packet)) { }
|
||||
explicit LootUnit(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_UNIT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace WorldPackets
|
||||
class LootResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootResponse() : ServerPacket(SMSG_LOOT_RESPONSE, 100) { }
|
||||
explicit LootResponse() : ServerPacket(SMSG_LOOT_RESPONSE, 100) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -85,11 +85,10 @@ namespace WorldPackets
|
||||
uint8 LootListID = 0;
|
||||
};
|
||||
|
||||
// PlayerCliLootItem
|
||||
class LootItem final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
LootItem(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_ITEM, std::move(packet)) { }
|
||||
explicit LootItem(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_ITEM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -100,7 +99,7 @@ namespace WorldPackets
|
||||
class MasterLootItem final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MasterLootItem(WorldPacket&& packet) : ClientPacket(CMSG_MASTER_LOOT_ITEM, std::move(packet)) { }
|
||||
explicit MasterLootItem(WorldPacket&& packet) : ClientPacket(CMSG_MASTER_LOOT_ITEM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -111,7 +110,7 @@ namespace WorldPackets
|
||||
class LootRemoved final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootRemoved() : ServerPacket(SMSG_LOOT_REMOVED, 30) { }
|
||||
explicit LootRemoved() : ServerPacket(SMSG_LOOT_REMOVED, 30) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -123,7 +122,7 @@ namespace WorldPackets
|
||||
class LootRelease final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
LootRelease(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_RELEASE, std::move(packet)) { }
|
||||
explicit LootRelease(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_RELEASE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -133,7 +132,7 @@ namespace WorldPackets
|
||||
class LootMoney final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
LootMoney(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_MONEY, std::move(packet)) { }
|
||||
explicit LootMoney(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_MONEY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -143,7 +142,7 @@ namespace WorldPackets
|
||||
class LootMoneyNotify final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootMoneyNotify() : ServerPacket(SMSG_LOOT_MONEY_NOTIFY, 5) { }
|
||||
explicit LootMoneyNotify() : ServerPacket(SMSG_LOOT_MONEY_NOTIFY, 5) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -155,7 +154,7 @@ namespace WorldPackets
|
||||
class CoinRemoved final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CoinRemoved() : ServerPacket(SMSG_COIN_REMOVED, 9) { }
|
||||
explicit CoinRemoved() : ServerPacket(SMSG_COIN_REMOVED, 9) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -165,7 +164,7 @@ namespace WorldPackets
|
||||
class LootRoll final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
LootRoll(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_ROLL, std::move(packet)) { }
|
||||
explicit LootRoll(WorldPacket&& packet) : ClientPacket(CMSG_LOOT_ROLL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -177,7 +176,7 @@ namespace WorldPackets
|
||||
class LootReleaseResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootReleaseResponse() : ServerPacket(SMSG_LOOT_RELEASE, 32) { }
|
||||
explicit LootReleaseResponse() : ServerPacket(SMSG_LOOT_RELEASE, 32) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -188,7 +187,7 @@ namespace WorldPackets
|
||||
class LootReleaseAll final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootReleaseAll() : ServerPacket(SMSG_LOOT_RELEASE_ALL, 0) { }
|
||||
explicit LootReleaseAll() : ServerPacket(SMSG_LOOT_RELEASE_ALL, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
@@ -196,7 +195,7 @@ namespace WorldPackets
|
||||
class LootList final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootList() : ServerPacket(SMSG_LOOT_LIST, 3 * 16) { }
|
||||
explicit LootList() : ServerPacket(SMSG_LOOT_LIST, 3 * 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -209,7 +208,7 @@ namespace WorldPackets
|
||||
class SetLootSpecialization final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetLootSpecialization(WorldPacket&& packet) : ClientPacket(CMSG_SET_LOOT_SPECIALIZATION, std::move(packet)) { }
|
||||
explicit SetLootSpecialization(WorldPacket&& packet) : ClientPacket(CMSG_SET_LOOT_SPECIALIZATION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -219,7 +218,7 @@ namespace WorldPackets
|
||||
class StartLootRoll final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
StartLootRoll() : ServerPacket(SMSG_START_LOOT_ROLL) { }
|
||||
explicit StartLootRoll() : ServerPacket(SMSG_START_LOOT_ROLL) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -236,7 +235,7 @@ namespace WorldPackets
|
||||
class LootRollBroadcast final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootRollBroadcast() : ServerPacket(SMSG_LOOT_ROLL) { }
|
||||
explicit LootRollBroadcast() : ServerPacket(SMSG_LOOT_ROLL) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -253,7 +252,7 @@ namespace WorldPackets
|
||||
class LootRollWon final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootRollWon() : ServerPacket(SMSG_LOOT_ROLL_WON) { }
|
||||
explicit LootRollWon() : ServerPacket(SMSG_LOOT_ROLL_WON) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -269,7 +268,7 @@ namespace WorldPackets
|
||||
class LootAllPassed final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootAllPassed() : ServerPacket(SMSG_LOOT_ALL_PASSED) { }
|
||||
explicit LootAllPassed() : ServerPacket(SMSG_LOOT_ALL_PASSED) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -281,7 +280,7 @@ namespace WorldPackets
|
||||
class LootRollsComplete final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LootRollsComplete() : ServerPacket(SMSG_LOOT_ROLLS_COMPLETE, 16 + 1) { }
|
||||
explicit LootRollsComplete() : ServerPacket(SMSG_LOOT_ROLLS_COMPLETE, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -293,7 +292,7 @@ namespace WorldPackets
|
||||
class MasterLootCandidateList final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MasterLootCandidateList() : ServerPacket(SMSG_MASTER_LOOT_CANDIDATE_LIST, 18 + 40 * 18) { }
|
||||
explicit MasterLootCandidateList() : ServerPacket(SMSG_MASTER_LOOT_CANDIDATE_LIST, 18 + 40 * 18) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -304,7 +303,7 @@ namespace WorldPackets
|
||||
class AELootTargets final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AELootTargets(uint32 count) : ServerPacket(SMSG_AE_LOOT_TARGETS, 4), Count(count) { }
|
||||
explicit AELootTargets(uint32 count) : ServerPacket(SMSG_AE_LOOT_TARGETS, 4), Count(count) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -314,11 +313,11 @@ namespace WorldPackets
|
||||
class AELootTargetsAck final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AELootTargetsAck() : ServerPacket(SMSG_AE_LOOT_TARGET_ACK, 0) { }
|
||||
explicit AELootTargetsAck() : ServerPacket(SMSG_AE_LOOT_TARGET_ACK, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LootPackets_h__
|
||||
#endif // TRINITYCORE_LOOT_PACKETS_H
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
#include "Mail.h"
|
||||
#include "Player.h"
|
||||
|
||||
WorldPackets::Mail::MailAttachedItem::MailAttachedItem(::Item const* item, uint8 pos)
|
||||
namespace WorldPackets::Mail
|
||||
{
|
||||
MailAttachedItem::MailAttachedItem(::Item const* item, uint8 pos)
|
||||
{
|
||||
Position = pos;
|
||||
AttachID = item->GetGUID().GetCounter();
|
||||
@@ -46,7 +48,7 @@ WorldPackets::Mail::MailAttachedItem::MailAttachedItem(::Item const* item, uint8
|
||||
{
|
||||
if (gemData.ItemID)
|
||||
{
|
||||
WorldPackets::Item::ItemGemData gem;
|
||||
Item::ItemGemData gem;
|
||||
gem.Slot = i;
|
||||
gem.Item.Initialize(&gemData);
|
||||
Gems.push_back(gem);
|
||||
@@ -55,7 +57,7 @@ WorldPackets::Mail::MailAttachedItem::MailAttachedItem(::Item const* item, uint8
|
||||
}
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailAttachedItem const& att)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MailAttachedItem const& att)
|
||||
{
|
||||
data << uint8(att.Position);
|
||||
data << uint64(att.AttachID);
|
||||
@@ -64,21 +66,21 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailAttachedItem co
|
||||
data << uint32(att.MaxDurability);
|
||||
data << int32(att.Durability);
|
||||
data << att.Item;
|
||||
data.WriteBits(att.Enchants.size(), 4);
|
||||
data.WriteBits(att.Gems.size(), 2);
|
||||
data.WriteBit(att.Unlocked);
|
||||
data << BitsSize<4>(att.Enchants);
|
||||
data << BitsSize<2>(att.Gems);
|
||||
data << Bits<1>(att.Unlocked);
|
||||
data.FlushBits();
|
||||
|
||||
for (WorldPackets::Item::ItemGemData const& gem : att.Gems)
|
||||
for (Item::ItemGemData const& gem : att.Gems)
|
||||
data << gem;
|
||||
|
||||
for (WorldPackets::Item::ItemEnchantData const& en : att.Enchants)
|
||||
for (Item::ItemEnchantData const& en : att.Enchants)
|
||||
data << en;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPackets::Mail::MailListEntry::MailListEntry(::Mail const* mail, ::Player* player)
|
||||
MailListEntry::MailListEntry(::Mail const* mail, Player* player)
|
||||
{
|
||||
MailID = mail->messageID;
|
||||
SenderType = mail->messageType;
|
||||
@@ -116,7 +118,7 @@ WorldPackets::Mail::MailListEntry::MailListEntry(::Mail const* mail, ::Player* p
|
||||
}
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailListEntry const& entry)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MailListEntry const& entry)
|
||||
{
|
||||
data << uint64(entry.MailID);
|
||||
data << uint32(entry.SenderType);
|
||||
@@ -126,7 +128,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailListEntry const
|
||||
data << int32(entry.Flags);
|
||||
data << float(entry.DaysLeft);
|
||||
data << int32(entry.MailTemplateID);
|
||||
data << uint32(entry.Attachments.size());
|
||||
data << WorldPackets::Size<uint32>(entry.Attachments);
|
||||
|
||||
switch (entry.SenderType)
|
||||
{
|
||||
@@ -147,27 +149,27 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailListEntry const
|
||||
break;
|
||||
}
|
||||
|
||||
data.WriteBits(entry.Subject.size(), 8);
|
||||
data.WriteBits(entry.Body.size(), 13);
|
||||
data << SizedString::BitsSize<8>(entry.Subject);
|
||||
data << SizedString::BitsSize<13>(entry.Body);
|
||||
data.FlushBits();
|
||||
|
||||
for (WorldPackets::Mail::MailAttachedItem const& att : entry.Attachments)
|
||||
for (MailAttachedItem const& att : entry.Attachments)
|
||||
data << att;
|
||||
|
||||
data.WriteString(entry.Subject);
|
||||
data.WriteString(entry.Body);
|
||||
data << SizedString::Data(entry.Subject);
|
||||
data << SizedString::Data(entry.Body);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailGetList::Read()
|
||||
void MailGetList::Read()
|
||||
{
|
||||
_worldPacket >> Mailbox;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Mail::MailListResult::Write()
|
||||
WorldPacket const* MailListResult::Write()
|
||||
{
|
||||
_worldPacket << uint32(Mails.size());
|
||||
_worldPacket << Size<uint32>(Mails);
|
||||
_worldPacket << int32(TotalNumRecords);
|
||||
|
||||
for (MailListEntry const& mail : Mails)
|
||||
@@ -176,47 +178,47 @@ WorldPacket const* WorldPackets::Mail::MailListResult::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailCreateTextItem::Read()
|
||||
void MailCreateTextItem::Read()
|
||||
{
|
||||
_worldPacket >> Mailbox;
|
||||
_worldPacket >> MailID;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Mail::SendMail::StructSendMail::MailAttachment& attachment)
|
||||
ByteBuffer& operator>>(ByteBuffer& data, SendMail::StructSendMail::MailAttachment& attachment)
|
||||
{
|
||||
data >> attachment.AttachPosition;
|
||||
data >> attachment.ItemGUID;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::SendMail::Read()
|
||||
void SendMail::Read()
|
||||
{
|
||||
_worldPacket >> Info.Mailbox;
|
||||
_worldPacket >> Info.StationeryID;
|
||||
_worldPacket >> Info.SendMoney;
|
||||
_worldPacket >> Info.Cod;
|
||||
|
||||
uint32 targetLength = _worldPacket.ReadBits(9);
|
||||
uint32 subjectLength = _worldPacket.ReadBits(9);
|
||||
uint32 bodyLength = _worldPacket.ReadBits(11);
|
||||
_worldPacket >> SizedString::BitsSize<9>(Info.Target);
|
||||
_worldPacket >> SizedString::BitsSize<9>(Info.Subject);
|
||||
_worldPacket >> SizedString::BitsSize<11>(Info.Body);
|
||||
_worldPacket >> BitsSize<5>(Info.Attachments);
|
||||
|
||||
Info.Attachments.resize(_worldPacket.ReadBits(5));
|
||||
|
||||
Info.Target = _worldPacket.ReadString(targetLength);
|
||||
Info.Subject = _worldPacket.ReadString(subjectLength);
|
||||
Info.Body = _worldPacket.ReadString(bodyLength);
|
||||
_worldPacket >> SizedString::Data(Info.Target);
|
||||
_worldPacket >> SizedString::Data(Info.Subject);
|
||||
_worldPacket >> SizedString::Data(Info.Body);
|
||||
|
||||
for (StructSendMail::MailAttachment& att : Info.Attachments)
|
||||
_worldPacket >> att;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailReturnToSender::Read()
|
||||
void MailReturnToSender::Read()
|
||||
{
|
||||
_worldPacket >> MailID;
|
||||
_worldPacket >> SenderGUID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Mail::MailCommandResult::Write()
|
||||
WorldPacket const* MailCommandResult::Write()
|
||||
{
|
||||
_worldPacket << uint64(MailID);
|
||||
_worldPacket << int32(Command);
|
||||
@@ -228,33 +230,33 @@ WorldPacket const* WorldPackets::Mail::MailCommandResult::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailMarkAsRead::Read()
|
||||
void MailMarkAsRead::Read()
|
||||
{
|
||||
_worldPacket >> Mailbox;
|
||||
_worldPacket >> MailID;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailDelete::Read()
|
||||
void MailDelete::Read()
|
||||
{
|
||||
_worldPacket >> MailID;
|
||||
_worldPacket >> DeleteReason;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailTakeItem::Read()
|
||||
void MailTakeItem::Read()
|
||||
{
|
||||
_worldPacket >> Mailbox;
|
||||
_worldPacket >> MailID;
|
||||
_worldPacket >> AttachID;
|
||||
}
|
||||
|
||||
void WorldPackets::Mail::MailTakeMoney::Read()
|
||||
void MailTakeMoney::Read()
|
||||
{
|
||||
_worldPacket >> Mailbox;
|
||||
_worldPacket >> MailID;
|
||||
_worldPacket >> Money;
|
||||
}
|
||||
|
||||
WorldPackets::Mail::MailQueryNextTimeResult::MailNextTimeEntry::MailNextTimeEntry(::Mail const* mail)
|
||||
MailQueryNextTimeResult::MailNextTimeEntry::MailNextTimeEntry(::Mail const* mail)
|
||||
{
|
||||
switch (mail->messageType)
|
||||
{
|
||||
@@ -280,12 +282,12 @@ WorldPackets::Mail::MailQueryNextTimeResult::MailNextTimeEntry::MailNextTimeEntr
|
||||
StationeryID = mail->stationery;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Mail::MailQueryNextTimeResult::Write()
|
||||
WorldPacket const* MailQueryNextTimeResult::Write()
|
||||
{
|
||||
_worldPacket << float(NextMailTime);
|
||||
_worldPacket << int32(Next.size());
|
||||
_worldPacket << Size<int32>(Next);
|
||||
|
||||
for (auto const& entry : Next)
|
||||
for (MailNextTimeEntry const& entry : Next)
|
||||
{
|
||||
_worldPacket << entry.SenderGuid;
|
||||
_worldPacket << float(entry.TimeLeft);
|
||||
@@ -297,9 +299,10 @@ WorldPacket const* WorldPackets::Mail::MailQueryNextTimeResult::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Mail::NotifyReceivedMail::Write()
|
||||
WorldPacket const* NotifyReceivedMail::Write()
|
||||
{
|
||||
_worldPacket << float(Delay);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MailPackets_h__
|
||||
#define MailPackets_h__
|
||||
#ifndef TRINITYCORE_MAIL_PACKETS_H
|
||||
#define TRINITYCORE_MAIL_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
@@ -67,7 +67,7 @@ namespace WorldPackets
|
||||
class MailGetList final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailGetList(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_GET_LIST, std::move(packet)) { }
|
||||
explicit MailGetList(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_GET_LIST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace WorldPackets
|
||||
class MailListResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MailListResult() : ServerPacket(SMSG_MAIL_LIST_RESULT, 8) { }
|
||||
explicit MailListResult() : ServerPacket(SMSG_MAIL_LIST_RESULT, 8) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace WorldPackets
|
||||
class MailCreateTextItem final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailCreateTextItem(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_CREATE_TEXT_ITEM, std::move(packet)) { }
|
||||
explicit MailCreateTextItem(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_CREATE_TEXT_ITEM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace WorldPackets
|
||||
std::vector<MailAttachment> Attachments;
|
||||
};
|
||||
|
||||
SendMail(WorldPacket&& packet) : ClientPacket(CMSG_SEND_MAIL, std::move(packet)) { }
|
||||
explicit SendMail(WorldPacket&& packet) : ClientPacket(CMSG_SEND_MAIL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace WorldPackets
|
||||
class MailCommandResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MailCommandResult() : ServerPacket(SMSG_MAIL_COMMAND_RESULT) { }
|
||||
explicit MailCommandResult() : ServerPacket(SMSG_MAIL_COMMAND_RESULT) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace WorldPackets
|
||||
class MailReturnToSender final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailReturnToSender(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_RETURN_TO_SENDER, std::move(packet)) { }
|
||||
explicit MailReturnToSender(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_RETURN_TO_SENDER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace WorldPackets
|
||||
class MailMarkAsRead final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailMarkAsRead(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_MARK_AS_READ, std::move(packet)) { }
|
||||
explicit MailMarkAsRead(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_MARK_AS_READ, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace WorldPackets
|
||||
class MailDelete final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailDelete(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_DELETE, std::move(packet)) { }
|
||||
explicit MailDelete(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_DELETE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace WorldPackets
|
||||
class MailTakeItem final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailTakeItem(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_TAKE_ITEM, std::move(packet)) { }
|
||||
explicit MailTakeItem(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_TAKE_ITEM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace WorldPackets
|
||||
class MailTakeMoney final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailTakeMoney(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_TAKE_MONEY, std::move(packet)) { }
|
||||
explicit MailTakeMoney(WorldPacket&& packet) : ClientPacket(CMSG_MAIL_TAKE_MONEY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace WorldPackets
|
||||
class MailQueryNextMailTime final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MailQueryNextMailTime(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_NEXT_MAIL_TIME, std::move(packet)) { }
|
||||
explicit MailQueryNextMailTime(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_NEXT_MAIL_TIME, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -218,7 +218,7 @@ namespace WorldPackets
|
||||
int32 StationeryID = 0;
|
||||
};
|
||||
|
||||
MailQueryNextTimeResult() : ServerPacket(SMSG_MAIL_QUERY_NEXT_TIME_RESULT, 8) { }
|
||||
explicit MailQueryNextTimeResult() : ServerPacket(SMSG_MAIL_QUERY_NEXT_TIME_RESULT, 8) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace WorldPackets
|
||||
class NotifyReceivedMail : ServerPacket
|
||||
{
|
||||
public:
|
||||
NotifyReceivedMail() : ServerPacket(SMSG_NOTIFY_RECEIVED_MAIL, 4) { }
|
||||
explicit NotifyReceivedMail() : ServerPacket(SMSG_NOTIFY_RECEIVED_MAIL, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -238,7 +238,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailAttachedItem const& att);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Mail::MailListEntry const& entry);
|
||||
|
||||
#endif // MailPackets_h__
|
||||
#endif // TRINITYCORE_MAIL_PACKETS_H
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
*/
|
||||
|
||||
#include "MiscPackets.h"
|
||||
#include "Common.h"
|
||||
#include "Player.h"
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::BindPointUpdate::Write()
|
||||
namespace WorldPackets::Misc
|
||||
{
|
||||
WorldPacket const* BindPointUpdate::Write()
|
||||
{
|
||||
_worldPacket << BindPosition;
|
||||
_worldPacket << uint32(BindMapID);
|
||||
@@ -27,14 +29,14 @@ WorldPacket const* WorldPackets::Misc::BindPointUpdate::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::InvalidatePlayer::Write()
|
||||
WorldPacket const* InvalidatePlayer::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::LoginSetTimeSpeed::Write()
|
||||
WorldPacket const* LoginSetTimeSpeed::Write()
|
||||
{
|
||||
_worldPacket << ServerTime;
|
||||
_worldPacket << GameTime;
|
||||
@@ -45,28 +47,28 @@ WorldPacket const* WorldPackets::Misc::LoginSetTimeSpeed::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetCurrency::Write()
|
||||
WorldPacket const* SetCurrency::Write()
|
||||
{
|
||||
_worldPacket << int32(Type);
|
||||
_worldPacket << int32(Quantity);
|
||||
_worldPacket << uint32(Flags);
|
||||
_worldPacket << uint32(Toasts.size());
|
||||
_worldPacket << Size<uint32>(Toasts);
|
||||
|
||||
for (WorldPackets::Item::UiEventToast const& toast : Toasts)
|
||||
for (Item::UiEventToast const& toast : Toasts)
|
||||
_worldPacket << toast;
|
||||
|
||||
_worldPacket.WriteBit(WeeklyQuantity.has_value());
|
||||
_worldPacket.WriteBit(TrackedQuantity.has_value());
|
||||
_worldPacket.WriteBit(MaxQuantity.has_value());
|
||||
_worldPacket.WriteBit(TotalEarned.has_value());
|
||||
_worldPacket.WriteBit(SuppressChatLog);
|
||||
_worldPacket.WriteBit(QuantityChange.has_value());
|
||||
_worldPacket.WriteBit(QuantityGainSource.has_value());
|
||||
_worldPacket.WriteBit(QuantityLostSource.has_value());
|
||||
_worldPacket.WriteBit(FirstCraftOperationID.has_value());
|
||||
_worldPacket.WriteBit(NextRechargeTime.has_value());
|
||||
_worldPacket.WriteBit(RechargeCycleStartTime.has_value());
|
||||
_worldPacket.WriteBit(OverflownCurrencyID.has_value());
|
||||
_worldPacket << OptionalInit(WeeklyQuantity);
|
||||
_worldPacket << OptionalInit(TrackedQuantity);
|
||||
_worldPacket << OptionalInit(MaxQuantity);
|
||||
_worldPacket << OptionalInit(TotalEarned);
|
||||
_worldPacket << Bits<1>(SuppressChatLog);
|
||||
_worldPacket << OptionalInit(QuantityChange);
|
||||
_worldPacket << OptionalInit(QuantityGainSource);
|
||||
_worldPacket << OptionalInit(QuantityLostSource);
|
||||
_worldPacket << OptionalInit(FirstCraftOperationID);
|
||||
_worldPacket << OptionalInit(NextRechargeTime);
|
||||
_worldPacket << OptionalInit(RechargeCycleStartTime);
|
||||
_worldPacket << OptionalInit(OverflownCurrencyID);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (WeeklyQuantity)
|
||||
@@ -105,28 +107,28 @@ WorldPacket const* WorldPackets::Misc::SetCurrency::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SetSelection::Read()
|
||||
void SetSelection::Read()
|
||||
{
|
||||
_worldPacket >> Selection;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetupCurrency::Write()
|
||||
WorldPacket const* SetupCurrency::Write()
|
||||
{
|
||||
_worldPacket << uint32(Data.size());
|
||||
_worldPacket << Size<uint32>(Data);
|
||||
|
||||
for (Record const& data : Data)
|
||||
{
|
||||
_worldPacket << int32(data.Type);
|
||||
_worldPacket << int32(data.Quantity);
|
||||
|
||||
_worldPacket.WriteBit(data.WeeklyQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.MaxWeeklyQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.TrackedQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.MaxQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.TotalEarned.has_value());
|
||||
_worldPacket.WriteBit(data.NextRechargeTime.has_value());
|
||||
_worldPacket.WriteBit(data.RechargeCycleStartTime.has_value());
|
||||
_worldPacket.WriteBits(uint8(data.Flags), 5);
|
||||
_worldPacket << OptionalInit(data.WeeklyQuantity);
|
||||
_worldPacket << OptionalInit(data.MaxWeeklyQuantity);
|
||||
_worldPacket << OptionalInit(data.TrackedQuantity);
|
||||
_worldPacket << OptionalInit(data.MaxQuantity);
|
||||
_worldPacket << OptionalInit(data.TotalEarned);
|
||||
_worldPacket << OptionalInit(data.NextRechargeTime);
|
||||
_worldPacket << OptionalInit(data.RechargeCycleStartTime);
|
||||
_worldPacket << Bits<5>(data.Flags);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (data.WeeklyQuantity)
|
||||
@@ -148,38 +150,38 @@ WorldPacket const* WorldPackets::Misc::SetupCurrency::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::ViolenceLevel::Read()
|
||||
void ViolenceLevel::Read()
|
||||
{
|
||||
_worldPacket >> ViolenceLvl;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::TimeSyncRequest::Write()
|
||||
WorldPacket const* TimeSyncRequest::Write()
|
||||
{
|
||||
_worldPacket << SequenceIndex;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::TimeSyncResponse::Read()
|
||||
void TimeSyncResponse::Read()
|
||||
{
|
||||
_worldPacket >> SequenceIndex;
|
||||
_worldPacket >> ClientTime;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::ServerTimeOffset::Write()
|
||||
WorldPacket const* ServerTimeOffset::Write()
|
||||
{
|
||||
_worldPacket << Time;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::TriggerMovie::Write()
|
||||
WorldPacket const* TriggerMovie::Write()
|
||||
{
|
||||
_worldPacket << uint32(MovieID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
WorldPacket const* WorldPackets::Misc::TriggerCinematic::Write()
|
||||
WorldPacket const* TriggerCinematic::Write()
|
||||
{
|
||||
_worldPacket << uint32(CinematicID);
|
||||
_worldPacket << ConversationGuid;
|
||||
@@ -187,30 +189,31 @@ WorldPacket const* WorldPackets::Misc::TriggerCinematic::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::TutorialFlags::Write()
|
||||
WorldPacket const* TutorialFlags::Write()
|
||||
{
|
||||
_worldPacket.append(TutorialData, MAX_ACCOUNT_TUTORIAL_VALUES);
|
||||
_worldPacket.append(TutorialData);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::TutorialSetFlag::Read()
|
||||
void TutorialSetFlag::Read()
|
||||
{
|
||||
Action = _worldPacket.ReadBits(2);
|
||||
_worldPacket >> Bits<2>(Action);
|
||||
|
||||
if (Action == TUTORIAL_ACTION_UPDATE)
|
||||
_worldPacket >> TutorialBit;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::WorldServerInfo::Write()
|
||||
WorldPacket const* WorldServerInfo::Write()
|
||||
{
|
||||
_worldPacket << uint32(DifficultyID);
|
||||
_worldPacket.WriteBit(IsTournamentRealm);
|
||||
_worldPacket.WriteBit(XRealmPvpAlert);
|
||||
_worldPacket.WriteBit(BlockExitingLoadingScreen);
|
||||
_worldPacket.WriteBit(RestrictedAccountMaxLevel.has_value());
|
||||
_worldPacket.WriteBit(RestrictedAccountMaxMoney.has_value());
|
||||
_worldPacket.WriteBit(InstanceGroupSize.has_value());
|
||||
_worldPacket << Bits<1>(IsTournamentRealm);
|
||||
_worldPacket << Bits<1>(XRealmPvpAlert);
|
||||
_worldPacket << Bits<1>(BlockExitingLoadingScreen);
|
||||
_worldPacket << OptionalInit(RestrictedAccountMaxLevel);
|
||||
_worldPacket << OptionalInit(RestrictedAccountMaxMoney);
|
||||
_worldPacket << OptionalInit(InstanceGroupSize);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (RestrictedAccountMaxLevel)
|
||||
_worldPacket << uint32(*RestrictedAccountMaxLevel);
|
||||
@@ -221,43 +224,43 @@ WorldPacket const* WorldPackets::Misc::WorldServerInfo::Write()
|
||||
if (InstanceGroupSize)
|
||||
_worldPacket << uint32(*InstanceGroupSize);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SetDungeonDifficulty::Read()
|
||||
void SetDungeonDifficulty::Read()
|
||||
{
|
||||
_worldPacket >> DifficultyID;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SetRaidDifficulty::Read()
|
||||
void SetRaidDifficulty::Read()
|
||||
{
|
||||
_worldPacket >> DifficultyID;
|
||||
_worldPacket >> Legacy;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::DungeonDifficultySet::Write()
|
||||
WorldPacket const* DungeonDifficultySet::Write()
|
||||
{
|
||||
_worldPacket << int32(DifficultyID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::RaidDifficultySet::Write()
|
||||
WorldPacket const* RaidDifficultySet::Write()
|
||||
{
|
||||
_worldPacket << int32(DifficultyID);
|
||||
_worldPacket << uint8(Legacy);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::CorpseReclaimDelay::Write()
|
||||
WorldPacket const* CorpseReclaimDelay::Write()
|
||||
{
|
||||
_worldPacket << Remaining;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::DeathReleaseLoc::Write()
|
||||
WorldPacket const* DeathReleaseLoc::Write()
|
||||
{
|
||||
_worldPacket << MapID;
|
||||
_worldPacket << Loc;
|
||||
@@ -265,79 +268,74 @@ WorldPacket const* WorldPackets::Misc::DeathReleaseLoc::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PreRessurect::Write()
|
||||
WorldPacket const* PreRessurect::Write()
|
||||
{
|
||||
_worldPacket << PlayerGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::ReclaimCorpse::Read()
|
||||
void ReclaimCorpse::Read()
|
||||
{
|
||||
_worldPacket >> CorpseGUID;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::RepopRequest::Read()
|
||||
void RepopRequest::Read()
|
||||
{
|
||||
CheckInstance = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(CheckInstance);
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::RequestCemeteryListResponse::Write()
|
||||
WorldPacket const* RequestCemeteryListResponse::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(IsGossipTriggered);
|
||||
_worldPacket << Bits<1>(IsGossipTriggered);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << uint32(CemeteryID.size());
|
||||
_worldPacket << Size<uint32>(CemeteryID);
|
||||
for (uint32 cemetery : CemeteryID)
|
||||
_worldPacket << cemetery;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::ResurrectResponse::Read()
|
||||
void ResurrectResponse::Read()
|
||||
{
|
||||
_worldPacket >> Resurrecter;
|
||||
_worldPacket >> Response;
|
||||
}
|
||||
|
||||
WorldPackets::Misc::Weather::Weather() : ServerPacket(SMSG_WEATHER, 4 + 4 + 1) { }
|
||||
|
||||
WorldPackets::Misc::Weather::Weather(WeatherState weatherID, float intensity /*= 0.0f*/, bool abrupt /*= false*/)
|
||||
: ServerPacket(SMSG_WEATHER, 4 + 4 + 1), Abrupt(abrupt), Intensity(intensity), WeatherID(weatherID) { }
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::Weather::Write()
|
||||
WorldPacket const* Weather::Write()
|
||||
{
|
||||
_worldPacket << uint32(WeatherID);
|
||||
_worldPacket << float(Intensity);
|
||||
_worldPacket.WriteBit(Abrupt);
|
||||
|
||||
_worldPacket << Bits<1>(Abrupt);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::StandStateChange::Read()
|
||||
void StandStateChange::Read()
|
||||
{
|
||||
_worldPacket >> As<uint8>(StandState);
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StandStateUpdate::Write()
|
||||
WorldPacket const* StandStateUpdate::Write()
|
||||
{
|
||||
_worldPacket << uint8(State);
|
||||
_worldPacket << As<uint8>(State);
|
||||
_worldPacket << uint32(AnimKitID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetAnimTier::Write()
|
||||
WorldPacket const* SetAnimTier::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
_worldPacket.WriteBits(Tier, 3);
|
||||
_worldPacket << Bits<3>(Tier);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PlayerBound::Write()
|
||||
WorldPacket const* PlayerBound::Write()
|
||||
{
|
||||
_worldPacket << BinderID;
|
||||
_worldPacket << uint32(AreaID);
|
||||
@@ -345,36 +343,36 @@ WorldPacket const* WorldPackets::Misc::PlayerBound::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StartMirrorTimer::Write()
|
||||
WorldPacket const* StartMirrorTimer::Write()
|
||||
{
|
||||
_worldPacket << uint8(Timer);
|
||||
_worldPacket << int32(Value);
|
||||
_worldPacket << int32(MaxValue);
|
||||
_worldPacket << int32(Scale);
|
||||
_worldPacket << int32(SpellID);
|
||||
_worldPacket.WriteBit(Paused);
|
||||
_worldPacket << Bits<1>(Paused);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PauseMirrorTimer::Write()
|
||||
WorldPacket const* PauseMirrorTimer::Write()
|
||||
{
|
||||
_worldPacket << uint8(Timer);
|
||||
_worldPacket.WriteBit(Paused);
|
||||
_worldPacket << Bits<1>(Paused);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StopMirrorTimer::Write()
|
||||
WorldPacket const* StopMirrorTimer::Write()
|
||||
{
|
||||
_worldPacket << uint8(Timer);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::ExplorationExperience::Write()
|
||||
WorldPacket const* ExplorationExperience::Write()
|
||||
{
|
||||
_worldPacket << int32(AreaID);
|
||||
_worldPacket << int32(Experience);
|
||||
@@ -382,7 +380,7 @@ WorldPacket const* WorldPackets::Misc::ExplorationExperience::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::LevelUpInfo::Write()
|
||||
WorldPacket const* LevelUpInfo::Write()
|
||||
{
|
||||
_worldPacket << int32(Level);
|
||||
_worldPacket << int32(HealthDelta);
|
||||
@@ -399,23 +397,23 @@ WorldPacket const* WorldPackets::Misc::LevelUpInfo::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PlayMusic::Write()
|
||||
WorldPacket const* PlayMusic::Write()
|
||||
{
|
||||
_worldPacket << uint32(SoundKitID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::RandomRollClient::Read()
|
||||
void RandomRollClient::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Min;
|
||||
_worldPacket >> Max;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::RandomRoll::Write()
|
||||
WorldPacket const* RandomRoll::Write()
|
||||
{
|
||||
_worldPacket << Roller;
|
||||
_worldPacket << RollerWowAccount;
|
||||
@@ -426,32 +424,33 @@ WorldPacket const* WorldPackets::Misc::RandomRoll::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::EnableBarberShop::Write()
|
||||
WorldPacket const* EnableBarberShop::Write()
|
||||
{
|
||||
_worldPacket << uint32(CustomizationFeatureMask);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Misc::PhaseShiftDataPhase const& phaseShiftDataPhase)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PhaseShiftDataPhase const& phaseShiftDataPhase)
|
||||
{
|
||||
data << uint32(phaseShiftDataPhase.PhaseFlags);
|
||||
data << uint16(phaseShiftDataPhase.Id);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Misc::PhaseShiftData const& phaseShiftData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PhaseShiftData const& phaseShiftData)
|
||||
{
|
||||
data << uint32(phaseShiftData.PhaseShiftFlags);
|
||||
data << uint32(phaseShiftData.Phases.size());
|
||||
data << WorldPackets::Size<uint32>(phaseShiftData.Phases);
|
||||
data << phaseShiftData.PersonalGUID;
|
||||
for (WorldPackets::Misc::PhaseShiftDataPhase const& phaseShiftDataPhase : phaseShiftData.Phases)
|
||||
for (PhaseShiftDataPhase const& phaseShiftDataPhase : phaseShiftData.Phases)
|
||||
data << phaseShiftDataPhase;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PhaseShiftChange::Write()
|
||||
WorldPacket const* PhaseShiftChange::Write()
|
||||
{
|
||||
_worldPacket << Client;
|
||||
_worldPacket << Phaseshift;
|
||||
@@ -470,31 +469,31 @@ WorldPacket const* WorldPackets::Misc::PhaseShiftChange::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::ZoneUnderAttack::Write()
|
||||
WorldPacket const* ZoneUnderAttack::Write()
|
||||
{
|
||||
_worldPacket << int32(AreaID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::DurabilityDamageDeath::Write()
|
||||
WorldPacket const* DurabilityDamageDeath::Write()
|
||||
{
|
||||
_worldPacket << int32(Percent);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::ObjectUpdateFailed::Read()
|
||||
void ObjectUpdateFailed::Read()
|
||||
{
|
||||
_worldPacket >> ObjectGUID;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::ObjectUpdateRescued::Read()
|
||||
void ObjectUpdateRescued::Read()
|
||||
{
|
||||
_worldPacket >> ObjectGUID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PlayObjectSound::Write()
|
||||
WorldPacket const* PlayObjectSound::Write()
|
||||
{
|
||||
_worldPacket << int32(SoundKitID);
|
||||
_worldPacket << SourceObjectGUID;
|
||||
@@ -505,7 +504,7 @@ WorldPacket const* WorldPackets::Misc::PlayObjectSound::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PlaySound::Write()
|
||||
WorldPacket const* PlaySound::Write()
|
||||
{
|
||||
_worldPacket << int32(SoundKitID);
|
||||
_worldPacket << SourceObjectGuid;
|
||||
@@ -514,7 +513,7 @@ WorldPacket const* WorldPackets::Misc::PlaySound::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PlaySpeakerbotSound::Write()
|
||||
WorldPacket const* PlaySpeakerbotSound::Write()
|
||||
{
|
||||
_worldPacket << SourceObjectGUID;
|
||||
_worldPacket << int32(SoundKitID);
|
||||
@@ -522,26 +521,26 @@ WorldPacket const* WorldPackets::Misc::PlaySpeakerbotSound::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StopSpeakerbotSound::Write()
|
||||
WorldPacket const* StopSpeakerbotSound::Write()
|
||||
{
|
||||
_worldPacket << SourceObjectGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::FarSight::Read()
|
||||
void FarSight::Read()
|
||||
{
|
||||
Enable = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Enable);
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SaveCUFProfiles::Read()
|
||||
void SaveCUFProfiles::Read()
|
||||
{
|
||||
CUFProfiles.resize(_worldPacket.read<uint32>());
|
||||
for (std::unique_ptr<CUFProfile>& cufProfile : CUFProfiles)
|
||||
{
|
||||
cufProfile = std::make_unique<CUFProfile>();
|
||||
|
||||
uint8 strLen = _worldPacket.ReadBits(7);
|
||||
_worldPacket >> SizedString::BitsSize<7>(cufProfile->ProfileName);
|
||||
|
||||
// Bool Options
|
||||
for (uint8 option = 0; option < CUF_BOOL_OPTIONS_COUNT; option++)
|
||||
@@ -562,44 +561,44 @@ void WorldPackets::Misc::SaveCUFProfiles::Read()
|
||||
_worldPacket >> cufProfile->BottomOffset;
|
||||
_worldPacket >> cufProfile->LeftOffset;
|
||||
|
||||
cufProfile->ProfileName = _worldPacket.ReadString(strLen);
|
||||
_worldPacket >> SizedString::Data(cufProfile->ProfileName);
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::LoadCUFProfiles::Write()
|
||||
WorldPacket const* LoadCUFProfiles::Write()
|
||||
{
|
||||
_worldPacket << uint32(CUFProfiles.size());
|
||||
_worldPacket << Size<uint32>(CUFProfiles);
|
||||
|
||||
for (CUFProfile const* cufProfile : CUFProfiles)
|
||||
{
|
||||
_worldPacket.WriteBits(cufProfile->ProfileName.size(), 7);
|
||||
_worldPacket << SizedString::BitsSize<7>(cufProfile->ProfileName);
|
||||
|
||||
// Bool Options
|
||||
for (uint8 option = 0; option < CUF_BOOL_OPTIONS_COUNT; option++)
|
||||
_worldPacket.WriteBit(cufProfile->BoolOptions[option]);
|
||||
_worldPacket << Bits<1>(cufProfile->BoolOptions[option]);
|
||||
|
||||
// Other Options
|
||||
_worldPacket << cufProfile->FrameHeight;
|
||||
_worldPacket << cufProfile->FrameWidth;
|
||||
_worldPacket << uint16(cufProfile->FrameHeight);
|
||||
_worldPacket << uint16(cufProfile->FrameWidth);
|
||||
|
||||
_worldPacket << cufProfile->SortBy;
|
||||
_worldPacket << cufProfile->HealthText;
|
||||
_worldPacket << uint8(cufProfile->SortBy);
|
||||
_worldPacket << uint8(cufProfile->HealthText);
|
||||
|
||||
_worldPacket << cufProfile->TopPoint;
|
||||
_worldPacket << cufProfile->BottomPoint;
|
||||
_worldPacket << cufProfile->LeftPoint;
|
||||
_worldPacket << uint8(cufProfile->TopPoint);
|
||||
_worldPacket << uint8(cufProfile->BottomPoint);
|
||||
_worldPacket << uint8(cufProfile->LeftPoint);
|
||||
|
||||
_worldPacket << cufProfile->TopOffset;
|
||||
_worldPacket << cufProfile->BottomOffset;
|
||||
_worldPacket << cufProfile->LeftOffset;
|
||||
_worldPacket << uint16(cufProfile->TopOffset);
|
||||
_worldPacket << uint16(cufProfile->BottomOffset);
|
||||
_worldPacket << uint16(cufProfile->LeftOffset);
|
||||
|
||||
_worldPacket.WriteString(cufProfile->ProfileName);
|
||||
_worldPacket << SizedString::Data(cufProfile->ProfileName);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::PlayOneShotAnimKit::Write()
|
||||
WorldPacket const* PlayOneShotAnimKit::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
_worldPacket << uint16(AnimKitID);
|
||||
@@ -607,7 +606,7 @@ WorldPacket const* WorldPackets::Misc::PlayOneShotAnimKit::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetAIAnimKit::Write()
|
||||
WorldPacket const* SetAIAnimKit::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
_worldPacket << uint16(AnimKitID);
|
||||
@@ -615,7 +614,7 @@ WorldPacket const* WorldPackets::Misc::SetAIAnimKit::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetMovementAnimKit::Write()
|
||||
WorldPacket const* SetMovementAnimKit::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
_worldPacket << uint16(AnimKitID);
|
||||
@@ -623,7 +622,7 @@ WorldPacket const* WorldPackets::Misc::SetMovementAnimKit::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetMeleeAnimKit::Write()
|
||||
WorldPacket const* SetMeleeAnimKit::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
_worldPacket << uint16(AnimKitID);
|
||||
@@ -631,57 +630,57 @@ WorldPacket const* WorldPackets::Misc::SetMeleeAnimKit::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SetPlayHoverAnim::Write()
|
||||
WorldPacket const* SetPlayHoverAnim::Write()
|
||||
{
|
||||
_worldPacket << UnitGUID;
|
||||
_worldPacket.WriteBit(PlayHoverAnim);
|
||||
_worldPacket << Bits<1>(PlayHoverAnim);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SetPvP::Read()
|
||||
void SetPvP::Read()
|
||||
{
|
||||
EnablePVP = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(EnablePVP);
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SetWarMode::Read()
|
||||
void SetWarMode::Read()
|
||||
{
|
||||
Enable = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Enable);
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::AccountHeirloomUpdate::Write()
|
||||
WorldPacket const* AccountHeirloomUpdate::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(IsFullUpdate);
|
||||
_worldPacket << Bits<1>(IsFullUpdate);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << int32(ItemCollectionType);
|
||||
|
||||
// both lists have to have the same size
|
||||
_worldPacket << uint32(Heirlooms->size());
|
||||
_worldPacket << uint32(Heirlooms->size());
|
||||
_worldPacket << Size<uint32>(*Heirlooms);
|
||||
_worldPacket << Size<uint32>(*Heirlooms);
|
||||
|
||||
for (auto const& item : *Heirlooms)
|
||||
_worldPacket << int32(item.first);
|
||||
for (auto const& [itemId, _] : *Heirlooms)
|
||||
_worldPacket << int32(itemId);
|
||||
|
||||
for (auto const& flags : *Heirlooms)
|
||||
_worldPacket << uint32(flags.second.flags);
|
||||
for (auto const& [_, data] : *Heirlooms)
|
||||
_worldPacket << uint32(data.flags);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::MountSpecial::Read()
|
||||
void MountSpecial::Read()
|
||||
{
|
||||
SpellVisualKitIDs.resize(_worldPacket.read<uint32>());
|
||||
_worldPacket >> Size<uint32>(SpellVisualKitIDs);
|
||||
_worldPacket >> SequenceVariation;
|
||||
for (int32& spellVisualKitId : SpellVisualKitIDs)
|
||||
_worldPacket >> spellVisualKitId;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SpecialMountAnim::Write()
|
||||
WorldPacket const* SpecialMountAnim::Write()
|
||||
{
|
||||
_worldPacket << UnitGUID;
|
||||
_worldPacket << uint32(SpellVisualKitIDs.size());
|
||||
_worldPacket << Size<uint32>(SpellVisualKitIDs);
|
||||
_worldPacket << int32(SequenceVariation);
|
||||
if (!SpellVisualKitIDs.empty())
|
||||
_worldPacket.append(SpellVisualKitIDs.data(), SpellVisualKitIDs.size());
|
||||
@@ -689,7 +688,7 @@ WorldPacket const* WorldPackets::Misc::SpecialMountAnim::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::CrossedInebriationThreshold::Write()
|
||||
WorldPacket const* CrossedInebriationThreshold::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
_worldPacket << int32(Threshold);
|
||||
@@ -698,12 +697,12 @@ WorldPacket const* WorldPackets::Misc::CrossedInebriationThreshold::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::SetTaxiBenchmarkMode::Read()
|
||||
void SetTaxiBenchmarkMode::Read()
|
||||
{
|
||||
Enable = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Enable);
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::OverrideLight::Write()
|
||||
WorldPacket const* OverrideLight::Write()
|
||||
{
|
||||
_worldPacket << int32(AreaLightID);
|
||||
_worldPacket << int32(OverrideLightID);
|
||||
@@ -712,11 +711,11 @@ WorldPacket const* WorldPackets::Misc::OverrideLight::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::DisplayGameError::Write()
|
||||
WorldPacket const* DisplayGameError::Write()
|
||||
{
|
||||
_worldPacket << uint32(Error);
|
||||
_worldPacket.WriteBit(Arg.has_value());
|
||||
_worldPacket.WriteBit(Arg2.has_value());
|
||||
_worldPacket << OptionalInit(Arg);
|
||||
_worldPacket << OptionalInit(Arg2);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (Arg)
|
||||
@@ -728,15 +727,15 @@ WorldPacket const* WorldPackets::Misc::DisplayGameError::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::AccountMountUpdate::Write()
|
||||
WorldPacket const* AccountMountUpdate::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(IsFullUpdate);
|
||||
_worldPacket << uint32(Mounts->size());
|
||||
_worldPacket << Bits<1>(IsFullUpdate);
|
||||
_worldPacket << Size<uint32>(*Mounts);
|
||||
|
||||
for (auto [spellId, flags] : *Mounts)
|
||||
for (auto const& [spellId, flags] : *Mounts)
|
||||
{
|
||||
_worldPacket << int32(spellId);
|
||||
_worldPacket.WriteBits(flags, 4);
|
||||
_worldPacket << Bits<4>(flags);
|
||||
}
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
@@ -744,23 +743,23 @@ WorldPacket const* WorldPackets::Misc::AccountMountUpdate::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::MountSetFavorite::Read()
|
||||
void MountSetFavorite::Read()
|
||||
{
|
||||
_worldPacket >> MountSpellID;
|
||||
IsFavorite = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(IsFavorite);
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::CloseInteraction::Read()
|
||||
void CloseInteraction::Read()
|
||||
{
|
||||
_worldPacket >> SourceGuid;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StartTimer::Write()
|
||||
WorldPacket const* StartTimer::Write()
|
||||
{
|
||||
_worldPacket << TotalTime;
|
||||
_worldPacket << int32(Type);
|
||||
_worldPacket << TimeLeft;
|
||||
_worldPacket.WriteBit(PlayerGuid.has_value());
|
||||
_worldPacket << OptionalInit(PlayerGuid);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (PlayerGuid)
|
||||
@@ -769,38 +768,38 @@ WorldPacket const* WorldPackets::Misc::StartTimer::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::QueryCountdownTimer::Read()
|
||||
void QueryCountdownTimer::Read()
|
||||
{
|
||||
_worldPacket >> As<int32>(TimerType);
|
||||
}
|
||||
|
||||
void WorldPackets::Misc::ConversationLineStarted::Read()
|
||||
void ConversationLineStarted::Read()
|
||||
{
|
||||
_worldPacket >> ConversationGUID;
|
||||
_worldPacket >> LineID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::SplashScreenShowLatest::Write()
|
||||
WorldPacket const* SplashScreenShowLatest::Write()
|
||||
{
|
||||
_worldPacket << int32(UISplashScreenID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::DisplayToast::Write()
|
||||
WorldPacket const* DisplayToast::Write()
|
||||
{
|
||||
_worldPacket << uint64(Quantity);
|
||||
_worldPacket << uint8(AsUnderlyingType(DisplayToastMethod));
|
||||
_worldPacket << As<uint8>(DisplayToastMethod);
|
||||
_worldPacket << uint32(QuestID);
|
||||
|
||||
_worldPacket.WriteBit(Mailed);
|
||||
_worldPacket.WriteBits(AsUnderlyingType(Type), 2);
|
||||
_worldPacket.WriteBit(IsSecondaryResult);
|
||||
_worldPacket << Bits<1>(Mailed);
|
||||
_worldPacket << Bits<2>(Type);
|
||||
_worldPacket << Bits<1>(IsSecondaryResult);
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case DisplayToastType::NewItem:
|
||||
_worldPacket.WriteBit(BonusRoll);
|
||||
_worldPacket << Bits<1>(BonusRoll);
|
||||
_worldPacket << Item;
|
||||
_worldPacket << int32(LootSpec);
|
||||
_worldPacket << int8(Gender);
|
||||
@@ -817,23 +816,24 @@ WorldPacket const* WorldPackets::Misc::DisplayToast::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::AccountWarbandSceneUpdate::Write()
|
||||
WorldPacket const* AccountWarbandSceneUpdate::Write()
|
||||
{
|
||||
_worldPacket << Bits<1>(IsFullUpdate);
|
||||
_worldPacket << uint32(WarbandScenes->size());
|
||||
_worldPacket << uint32(WarbandScenes->size());
|
||||
_worldPacket << uint32(WarbandScenes->size());
|
||||
_worldPacket << Size<uint32>(*WarbandScenes);
|
||||
_worldPacket << Size<uint32>(*WarbandScenes);
|
||||
_worldPacket << Size<uint32>(*WarbandScenes);
|
||||
|
||||
for (auto [warbandSceneId, _] : *WarbandScenes)
|
||||
for (auto const& [warbandSceneId, _] : *WarbandScenes)
|
||||
_worldPacket << uint32(warbandSceneId);
|
||||
|
||||
for (auto [_, data] : *WarbandScenes)
|
||||
for (auto const& [_, data] : *WarbandScenes)
|
||||
_worldPacket << Bits<1>(data.Flags.HasFlag(WarbandSceneCollectionFlags::Favorite));
|
||||
|
||||
for (auto [_, data] : *WarbandScenes)
|
||||
for (auto const& [_, data] : *WarbandScenes)
|
||||
_worldPacket << Bits<1>(data.Flags.HasFlag(WarbandSceneCollectionFlags::HasFanfare));
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MiscPackets_h__
|
||||
#define MiscPackets_h__
|
||||
#ifndef TRINITYCORE_MISC_PACKETS_H
|
||||
#define TRINITYCORE_MISC_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "CollectionMgr.h"
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "ObjectGuid.h"
|
||||
#include "Optional.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include "Player.h"
|
||||
#include "Position.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WowTime.h"
|
||||
@@ -33,6 +32,8 @@
|
||||
#include <map>
|
||||
|
||||
enum class CountdownTimerType : int32;
|
||||
enum class DisplayToastType : uint8;
|
||||
enum class DisplayToastMethod : uint8;
|
||||
enum UnitStandStateType : uint8;
|
||||
enum WeatherState : uint32;
|
||||
|
||||
@@ -43,7 +44,7 @@ namespace WorldPackets
|
||||
class BindPointUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
BindPointUpdate() : ServerPacket(SMSG_BIND_POINT_UPDATE, 20) { }
|
||||
explicit BindPointUpdate() : ServerPacket(SMSG_BIND_POINT_UPDATE, 20) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -55,8 +56,9 @@ namespace WorldPackets
|
||||
class PlayerBound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlayerBound() : ServerPacket(SMSG_PLAYER_BOUND, 16 + 4) { }
|
||||
PlayerBound(ObjectGuid binderId, uint32 areaId) : ServerPacket(SMSG_PLAYER_BOUND, 16 + 4), BinderID(binderId), AreaID(areaId) { }
|
||||
explicit PlayerBound() : ServerPacket(SMSG_PLAYER_BOUND, 16 + 4) { }
|
||||
explicit PlayerBound(ObjectGuid binderId, uint32 areaId) : ServerPacket(SMSG_PLAYER_BOUND, 16 + 4),
|
||||
BinderID(binderId), AreaID(areaId) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -67,7 +69,7 @@ namespace WorldPackets
|
||||
class InvalidatePlayer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
InvalidatePlayer() : ServerPacket(SMSG_INVALIDATE_PLAYER, 18) { }
|
||||
explicit InvalidatePlayer() : ServerPacket(SMSG_INVALIDATE_PLAYER, 18) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -77,7 +79,7 @@ namespace WorldPackets
|
||||
class LoginSetTimeSpeed final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LoginSetTimeSpeed() : ServerPacket(SMSG_LOGIN_SET_TIME_SPEED, 20) { }
|
||||
explicit LoginSetTimeSpeed() : ServerPacket(SMSG_LOGIN_SET_TIME_SPEED, 20) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -91,7 +93,7 @@ namespace WorldPackets
|
||||
class ResetWeeklyCurrency final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ResetWeeklyCurrency() : ServerPacket(SMSG_RESET_WEEKLY_CURRENCY, 0) { }
|
||||
explicit ResetWeeklyCurrency() : ServerPacket(SMSG_RESET_WEEKLY_CURRENCY, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
@@ -99,7 +101,7 @@ namespace WorldPackets
|
||||
class SetCurrency final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetCurrency() : ServerPacket(SMSG_SET_CURRENCY, 12) { }
|
||||
explicit SetCurrency() : ServerPacket(SMSG_SET_CURRENCY, 12) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -124,7 +126,7 @@ namespace WorldPackets
|
||||
class SetSelection final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetSelection(WorldPacket&& packet) : ClientPacket(CMSG_SET_SELECTION, std::move(packet)) { }
|
||||
explicit SetSelection(WorldPacket&& packet) : ClientPacket(CMSG_SET_SELECTION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -148,7 +150,7 @@ namespace WorldPackets
|
||||
uint8 Flags = 0;
|
||||
};
|
||||
|
||||
SetupCurrency() : ServerPacket(SMSG_SETUP_CURRENCY, 22) { }
|
||||
explicit SetupCurrency() : ServerPacket(SMSG_SETUP_CURRENCY, 22) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -158,7 +160,7 @@ namespace WorldPackets
|
||||
class ViolenceLevel final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ViolenceLevel(WorldPacket&& packet) : ClientPacket(CMSG_VIOLENCE_LEVEL, std::move(packet)) { }
|
||||
explicit ViolenceLevel(WorldPacket&& packet) : ClientPacket(CMSG_VIOLENCE_LEVEL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -168,7 +170,7 @@ namespace WorldPackets
|
||||
class TimeSyncRequest final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TimeSyncRequest() : ServerPacket(SMSG_TIME_SYNC_REQUEST, 4) { }
|
||||
explicit TimeSyncRequest() : ServerPacket(SMSG_TIME_SYNC_REQUEST, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -178,7 +180,7 @@ namespace WorldPackets
|
||||
class TimeSyncResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
TimeSyncResponse(WorldPacket&& packet) : ClientPacket(CMSG_TIME_SYNC_RESPONSE, std::move(packet)) { }
|
||||
explicit TimeSyncResponse(WorldPacket&& packet) : ClientPacket(CMSG_TIME_SYNC_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -191,7 +193,7 @@ namespace WorldPackets
|
||||
class TriggerCinematic final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TriggerCinematic() : ServerPacket(SMSG_TRIGGER_CINEMATIC, 4) { }
|
||||
explicit TriggerCinematic() : ServerPacket(SMSG_TRIGGER_CINEMATIC, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -202,7 +204,7 @@ namespace WorldPackets
|
||||
class TriggerMovie final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TriggerMovie() : ServerPacket(SMSG_TRIGGER_MOVIE, 4) { }
|
||||
explicit TriggerMovie() : ServerPacket(SMSG_TRIGGER_MOVIE, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -212,7 +214,7 @@ namespace WorldPackets
|
||||
class ServerTimeOffsetRequest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ServerTimeOffsetRequest(WorldPacket&& packet) : ClientPacket(CMSG_SERVER_TIME_OFFSET_REQUEST, std::move(packet)) { }
|
||||
explicit ServerTimeOffsetRequest(WorldPacket&& packet) : ClientPacket(CMSG_SERVER_TIME_OFFSET_REQUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -220,7 +222,7 @@ namespace WorldPackets
|
||||
class ServerTimeOffset final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ServerTimeOffset() : ServerPacket(SMSG_SERVER_TIME_OFFSET, 4) { }
|
||||
explicit ServerTimeOffset() : ServerPacket(SMSG_SERVER_TIME_OFFSET, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -230,20 +232,17 @@ namespace WorldPackets
|
||||
class TutorialFlags : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TutorialFlags() : ServerPacket(SMSG_TUTORIAL_FLAGS, 32)
|
||||
{
|
||||
std::memset(TutorialData, 0, sizeof(TutorialData));
|
||||
}
|
||||
explicit TutorialFlags() : ServerPacket(SMSG_TUTORIAL_FLAGS, 32) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 TutorialData[MAX_ACCOUNT_TUTORIAL_VALUES];
|
||||
std::array<uint32, MAX_ACCOUNT_TUTORIAL_VALUES> TutorialData = { };
|
||||
};
|
||||
|
||||
class TutorialSetFlag final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
TutorialSetFlag(WorldPacket&& packet) : ClientPacket(CMSG_TUTORIAL, std::move(packet)) { }
|
||||
explicit TutorialSetFlag(WorldPacket&& packet) : ClientPacket(CMSG_TUTORIAL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -254,7 +253,7 @@ namespace WorldPackets
|
||||
class WorldServerInfo final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
WorldServerInfo() : ServerPacket(SMSG_WORLD_SERVER_INFO, 26) { }
|
||||
explicit WorldServerInfo() : ServerPacket(SMSG_WORLD_SERVER_INFO, 26) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -271,7 +270,7 @@ namespace WorldPackets
|
||||
class SetDungeonDifficulty final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetDungeonDifficulty(WorldPacket&& packet) : ClientPacket(CMSG_SET_DUNGEON_DIFFICULTY, std::move(packet)) { }
|
||||
explicit SetDungeonDifficulty(WorldPacket&& packet) : ClientPacket(CMSG_SET_DUNGEON_DIFFICULTY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -281,7 +280,7 @@ namespace WorldPackets
|
||||
class SetRaidDifficulty final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetRaidDifficulty(WorldPacket&& packet) : ClientPacket(CMSG_SET_RAID_DIFFICULTY, std::move(packet)) { }
|
||||
explicit SetRaidDifficulty(WorldPacket&& packet) : ClientPacket(CMSG_SET_RAID_DIFFICULTY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -292,7 +291,7 @@ namespace WorldPackets
|
||||
class DungeonDifficultySet final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
DungeonDifficultySet() : ServerPacket(SMSG_SET_DUNGEON_DIFFICULTY, 4) { }
|
||||
explicit DungeonDifficultySet() : ServerPacket(SMSG_SET_DUNGEON_DIFFICULTY, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -302,7 +301,7 @@ namespace WorldPackets
|
||||
class RaidDifficultySet final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RaidDifficultySet() : ServerPacket(SMSG_RAID_DIFFICULTY_SET, 4 + 1) { }
|
||||
explicit RaidDifficultySet() : ServerPacket(SMSG_RAID_DIFFICULTY_SET, 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -313,7 +312,7 @@ namespace WorldPackets
|
||||
class CorpseReclaimDelay : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CorpseReclaimDelay() : ServerPacket(SMSG_CORPSE_RECLAIM_DELAY, 4) { }
|
||||
explicit CorpseReclaimDelay() : ServerPacket(SMSG_CORPSE_RECLAIM_DELAY, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -323,7 +322,7 @@ namespace WorldPackets
|
||||
class DeathReleaseLoc : public ServerPacket
|
||||
{
|
||||
public:
|
||||
DeathReleaseLoc() : ServerPacket(SMSG_DEATH_RELEASE_LOC, 4 + (3 * 4)) { }
|
||||
explicit DeathReleaseLoc() : ServerPacket(SMSG_DEATH_RELEASE_LOC, 4 + (3 * 4)) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -334,7 +333,7 @@ namespace WorldPackets
|
||||
class PortGraveyard final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PortGraveyard(WorldPacket&& packet) : ClientPacket(CMSG_CLIENT_PORT_GRAVEYARD, std::move(packet)) { }
|
||||
explicit PortGraveyard(WorldPacket&& packet) : ClientPacket(CMSG_CLIENT_PORT_GRAVEYARD, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -342,7 +341,7 @@ namespace WorldPackets
|
||||
class PreRessurect : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PreRessurect() : ServerPacket(SMSG_PRE_RESSURECT, 18) { }
|
||||
explicit PreRessurect() : ServerPacket(SMSG_PRE_RESSURECT, 18) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -352,7 +351,7 @@ namespace WorldPackets
|
||||
class ReclaimCorpse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ReclaimCorpse(WorldPacket&& packet) : ClientPacket(CMSG_RECLAIM_CORPSE, std::move(packet)) { }
|
||||
explicit ReclaimCorpse(WorldPacket&& packet) : ClientPacket(CMSG_RECLAIM_CORPSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -362,7 +361,7 @@ namespace WorldPackets
|
||||
class RepopRequest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RepopRequest(WorldPacket&& packet) : ClientPacket(CMSG_REPOP_REQUEST, std::move(packet)) { }
|
||||
explicit RepopRequest(WorldPacket&& packet) : ClientPacket(CMSG_REPOP_REQUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -372,7 +371,7 @@ namespace WorldPackets
|
||||
class RequestCemeteryList final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestCemeteryList(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_CEMETERY_LIST, std::move(packet)) { }
|
||||
explicit RequestCemeteryList(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_CEMETERY_LIST, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -380,7 +379,7 @@ namespace WorldPackets
|
||||
class RequestCemeteryListResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RequestCemeteryListResponse() : ServerPacket(SMSG_REQUEST_CEMETERY_LIST_RESPONSE, 1) { }
|
||||
explicit RequestCemeteryListResponse() : ServerPacket(SMSG_REQUEST_CEMETERY_LIST_RESPONSE, 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -391,7 +390,7 @@ namespace WorldPackets
|
||||
class ResurrectResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ResurrectResponse(WorldPacket&& packet) : ClientPacket(CMSG_RESURRECT_RESPONSE, std::move(packet)) { }
|
||||
explicit ResurrectResponse(WorldPacket&& packet) : ClientPacket(CMSG_RESURRECT_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -402,8 +401,9 @@ namespace WorldPackets
|
||||
class TC_GAME_API Weather final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
Weather();
|
||||
Weather(WeatherState weatherID, float intensity = 0.0f, bool abrupt = false);
|
||||
explicit Weather() : ServerPacket(SMSG_WEATHER, 4 + 4 + 1) { }
|
||||
explicit Weather(WeatherState weatherID, float intensity = 0.0f, bool abrupt = false) : ServerPacket(SMSG_WEATHER, 4 + 4 + 1),
|
||||
Abrupt(abrupt), Intensity(intensity), WeatherID(weatherID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -415,7 +415,7 @@ namespace WorldPackets
|
||||
class StandStateChange final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
StandStateChange(WorldPacket&& packet) : ClientPacket(CMSG_STAND_STATE_CHANGE, std::move(packet)) { }
|
||||
explicit StandStateChange(WorldPacket&& packet) : ClientPacket(CMSG_STAND_STATE_CHANGE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -425,8 +425,9 @@ namespace WorldPackets
|
||||
class StandStateUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
StandStateUpdate() : ServerPacket(SMSG_STAND_STATE_UPDATE, 4 + 1) { }
|
||||
StandStateUpdate(UnitStandStateType state, uint32 animKitID) : ServerPacket(SMSG_STAND_STATE_UPDATE, 4 + 1), AnimKitID(animKitID), State(state) { }
|
||||
explicit StandStateUpdate() : ServerPacket(SMSG_STAND_STATE_UPDATE, 4 + 1) { }
|
||||
explicit StandStateUpdate(UnitStandStateType state, uint32 animKitID) : ServerPacket(SMSG_STAND_STATE_UPDATE, 4 + 1),
|
||||
AnimKitID(animKitID), State(state) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -437,7 +438,7 @@ namespace WorldPackets
|
||||
class SetAnimTier final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetAnimTier(): ServerPacket(SMSG_SET_ANIM_TIER, 16 + 1) { }
|
||||
explicit SetAnimTier(): ServerPacket(SMSG_SET_ANIM_TIER, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -448,9 +449,10 @@ namespace WorldPackets
|
||||
class StartMirrorTimer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
StartMirrorTimer() : ServerPacket(SMSG_START_MIRROR_TIMER, 1 + 4 + 4 + 4 + 4 + 1) { }
|
||||
StartMirrorTimer(uint8 timer, int32 value, int32 maxValue, int32 scale, int32 spellID, bool paused) :
|
||||
ServerPacket(SMSG_START_MIRROR_TIMER, 1 + 4 + 4 + 4 + 4 + 1), Timer(timer), Scale(scale), MaxValue(maxValue), SpellID(spellID), Value(value), Paused(paused) { }
|
||||
explicit StartMirrorTimer() : ServerPacket(SMSG_START_MIRROR_TIMER, 1 + 4 + 4 + 4 + 4 + 1) { }
|
||||
explicit StartMirrorTimer(uint8 timer, int32 value, int32 maxValue, int32 scale, int32 spellID, bool paused)
|
||||
: ServerPacket(SMSG_START_MIRROR_TIMER, 1 + 4 + 4 + 4 + 4 + 1),
|
||||
Timer(timer), Scale(scale), MaxValue(maxValue), SpellID(spellID), Value(value), Paused(paused) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -465,8 +467,9 @@ namespace WorldPackets
|
||||
class PauseMirrorTimer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PauseMirrorTimer() : ServerPacket(SMSG_PAUSE_MIRROR_TIMER, 1 + 1) { }
|
||||
PauseMirrorTimer(uint8 timer, bool paused) : ServerPacket(SMSG_PAUSE_MIRROR_TIMER, 1 + 1), Timer(timer), Paused(paused) { }
|
||||
explicit PauseMirrorTimer() : ServerPacket(SMSG_PAUSE_MIRROR_TIMER, 1 + 1) { }
|
||||
explicit PauseMirrorTimer(uint8 timer, bool paused) : ServerPacket(SMSG_PAUSE_MIRROR_TIMER, 1 + 1),
|
||||
Timer(timer), Paused(paused) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -477,8 +480,8 @@ namespace WorldPackets
|
||||
class StopMirrorTimer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
StopMirrorTimer() : ServerPacket(SMSG_STOP_MIRROR_TIMER, 1) { }
|
||||
StopMirrorTimer(uint8 timer) : ServerPacket(SMSG_STOP_MIRROR_TIMER, 1), Timer(timer) { }
|
||||
explicit StopMirrorTimer() : ServerPacket(SMSG_STOP_MIRROR_TIMER, 1) { }
|
||||
explicit StopMirrorTimer(uint8 timer) : ServerPacket(SMSG_STOP_MIRROR_TIMER, 1), Timer(timer) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -488,8 +491,9 @@ namespace WorldPackets
|
||||
class ExplorationExperience final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ExplorationExperience() : ServerPacket(SMSG_EXPLORATION_EXPERIENCE, 8) { }
|
||||
ExplorationExperience(int32 experience, int32 areaID) : ServerPacket(SMSG_EXPLORATION_EXPERIENCE, 8), Experience(experience), AreaID(areaID) { }
|
||||
explicit ExplorationExperience() : ServerPacket(SMSG_EXPLORATION_EXPERIENCE, 8) { }
|
||||
explicit ExplorationExperience(int32 experience, int32 areaID) : ServerPacket(SMSG_EXPLORATION_EXPERIENCE, 8),
|
||||
Experience(experience), AreaID(areaID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -500,7 +504,7 @@ namespace WorldPackets
|
||||
class LevelUpInfo final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LevelUpInfo() : ServerPacket(SMSG_LEVEL_UP_INFO, 60) { }
|
||||
explicit LevelUpInfo() : ServerPacket(SMSG_LEVEL_UP_INFO, 60) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -515,8 +519,8 @@ namespace WorldPackets
|
||||
class PlayMusic final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlayMusic() : ServerPacket(SMSG_PLAY_MUSIC, 4) { }
|
||||
PlayMusic(uint32 soundKitID) : ServerPacket(SMSG_PLAY_MUSIC, 4), SoundKitID(soundKitID) { }
|
||||
explicit PlayMusic() : ServerPacket(SMSG_PLAY_MUSIC, 4) { }
|
||||
explicit PlayMusic(uint32 soundKitID) : ServerPacket(SMSG_PLAY_MUSIC, 4), SoundKitID(soundKitID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -526,7 +530,7 @@ namespace WorldPackets
|
||||
class RandomRollClient final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RandomRollClient(WorldPacket&& packet) : ClientPacket(CMSG_RANDOM_ROLL, std::move(packet)) { }
|
||||
explicit RandomRollClient(WorldPacket&& packet) : ClientPacket(CMSG_RANDOM_ROLL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -538,7 +542,7 @@ namespace WorldPackets
|
||||
class RandomRoll final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RandomRoll() : ServerPacket(SMSG_RANDOM_ROLL, 16 + 16 + 4 + 4 + 4) { }
|
||||
explicit RandomRoll() : ServerPacket(SMSG_RANDOM_ROLL, 16 + 16 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -552,7 +556,7 @@ namespace WorldPackets
|
||||
class EnableBarberShop final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
EnableBarberShop() : ServerPacket(SMSG_ENABLE_BARBER_SHOP, 1) { }
|
||||
explicit EnableBarberShop() : ServerPacket(SMSG_ENABLE_BARBER_SHOP, 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -575,7 +579,7 @@ namespace WorldPackets
|
||||
class PhaseShiftChange final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PhaseShiftChange() : ServerPacket(SMSG_PHASE_SHIFT_CHANGE, 16 + 4 + 4 + 16 + 4 + 4 + 4) { }
|
||||
explicit PhaseShiftChange() : ServerPacket(SMSG_PHASE_SHIFT_CHANGE, 16 + 4 + 4 + 16 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -589,7 +593,7 @@ namespace WorldPackets
|
||||
class ZoneUnderAttack final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ZoneUnderAttack() : ServerPacket(SMSG_ZONE_UNDER_ATTACK, 4) { }
|
||||
explicit ZoneUnderAttack() : ServerPacket(SMSG_ZONE_UNDER_ATTACK, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -599,7 +603,7 @@ namespace WorldPackets
|
||||
class DurabilityDamageDeath final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
DurabilityDamageDeath() : ServerPacket(SMSG_DURABILITY_DAMAGE_DEATH, 4) { }
|
||||
explicit DurabilityDamageDeath() : ServerPacket(SMSG_DURABILITY_DAMAGE_DEATH, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -609,7 +613,7 @@ namespace WorldPackets
|
||||
class ObjectUpdateFailed final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ObjectUpdateFailed(WorldPacket&& packet) : ClientPacket(CMSG_OBJECT_UPDATE_FAILED, std::move(packet)) { }
|
||||
explicit ObjectUpdateFailed(WorldPacket&& packet) : ClientPacket(CMSG_OBJECT_UPDATE_FAILED, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -619,7 +623,7 @@ namespace WorldPackets
|
||||
class ObjectUpdateRescued final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ObjectUpdateRescued(WorldPacket&& packet) : ClientPacket(CMSG_OBJECT_UPDATE_RESCUED, std::move(packet)) { }
|
||||
explicit ObjectUpdateRescued(WorldPacket&& packet) : ClientPacket(CMSG_OBJECT_UPDATE_RESCUED, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -629,9 +633,11 @@ namespace WorldPackets
|
||||
class PlayObjectSound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 16 + 16 + 4 + 4 * 3) { }
|
||||
PlayObjectSound(ObjectGuid targetObjectGUID, ObjectGuid sourceObjectGUID, int32 soundKitID, TaggedPosition<::Position::XYZ> position, int32 broadcastTextID) : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 16 + 16 + 4 + 4 * 3),
|
||||
TargetObjectGUID(targetObjectGUID), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID), Position(position), BroadcastTextID(broadcastTextID) { }
|
||||
explicit PlayObjectSound() : ServerPacket(SMSG_PLAY_OBJECT_SOUND, 16 + 16 + 4 + 4 * 3 + 4) { }
|
||||
explicit PlayObjectSound(ObjectGuid targetObjectGUID, ObjectGuid sourceObjectGUID, int32 soundKitID, TaggedPosition<::Position::XYZ> position, int32 broadcastTextID)
|
||||
: ServerPacket(SMSG_PLAY_OBJECT_SOUND, 16 + 16 + 4 + 4 * 3),
|
||||
TargetObjectGUID(targetObjectGUID), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID), Position(position),
|
||||
BroadcastTextID(broadcastTextID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -645,8 +651,8 @@ namespace WorldPackets
|
||||
class TC_GAME_API PlaySound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlaySound() : ServerPacket(SMSG_PLAY_SOUND, 20) { }
|
||||
PlaySound(ObjectGuid sourceObjectGuid, int32 soundKitID, int32 broadcastTextId) : ServerPacket(SMSG_PLAY_SOUND, 20),
|
||||
explicit PlaySound() : ServerPacket(SMSG_PLAY_SOUND, 16 + 4 + 4) { }
|
||||
explicit PlaySound(ObjectGuid sourceObjectGuid, int32 soundKitID, int32 broadcastTextId) : ServerPacket(SMSG_PLAY_SOUND, 16 + 4 + 4),
|
||||
SourceObjectGuid(sourceObjectGuid), SoundKitID(soundKitID), BroadcastTextID(broadcastTextId) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
@@ -659,7 +665,7 @@ namespace WorldPackets
|
||||
class PlaySpeakerbotSound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlaySpeakerbotSound(ObjectGuid const& sourceObjectGUID, int32 soundKitID)
|
||||
explicit PlaySpeakerbotSound(ObjectGuid const& sourceObjectGUID, int32 soundKitID)
|
||||
: ServerPacket(SMSG_PLAY_SPEAKERBOT_SOUND, 20), SourceObjectGUID(sourceObjectGUID), SoundKitID(soundKitID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
@@ -671,7 +677,7 @@ namespace WorldPackets
|
||||
class StopSpeakerbotSound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
StopSpeakerbotSound(ObjectGuid const& sourceObjectGUID)
|
||||
explicit StopSpeakerbotSound(ObjectGuid const& sourceObjectGUID)
|
||||
: ServerPacket(SMSG_STOP_SPEAKERBOT_SOUND, 16), SourceObjectGUID(sourceObjectGUID) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
@@ -682,7 +688,7 @@ namespace WorldPackets
|
||||
class CompleteCinematic final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
CompleteCinematic(WorldPacket&& packet) : ClientPacket(CMSG_COMPLETE_CINEMATIC, std::move(packet)) { }
|
||||
explicit CompleteCinematic(WorldPacket&& packet) : ClientPacket(CMSG_COMPLETE_CINEMATIC, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -690,7 +696,7 @@ namespace WorldPackets
|
||||
class NextCinematicCamera final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
NextCinematicCamera(WorldPacket&& packet) : ClientPacket(CMSG_NEXT_CINEMATIC_CAMERA, std::move(packet)) { }
|
||||
explicit NextCinematicCamera(WorldPacket&& packet) : ClientPacket(CMSG_NEXT_CINEMATIC_CAMERA, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -698,7 +704,7 @@ namespace WorldPackets
|
||||
class CompleteMovie final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
CompleteMovie(WorldPacket&& packet) : ClientPacket(CMSG_COMPLETE_MOVIE, std::move(packet)) { }
|
||||
explicit CompleteMovie(WorldPacket&& packet) : ClientPacket(CMSG_COMPLETE_MOVIE, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -706,7 +712,7 @@ namespace WorldPackets
|
||||
class FarSight final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
FarSight(WorldPacket&& packet) : ClientPacket(CMSG_FAR_SIGHT, std::move(packet)) { }
|
||||
explicit FarSight(WorldPacket&& packet) : ClientPacket(CMSG_FAR_SIGHT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -716,7 +722,7 @@ namespace WorldPackets
|
||||
class SaveCUFProfiles final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SaveCUFProfiles(WorldPacket&& packet) : ClientPacket(CMSG_SAVE_CUF_PROFILES, std::move(packet)) { }
|
||||
explicit SaveCUFProfiles(WorldPacket&& packet) : ClientPacket(CMSG_SAVE_CUF_PROFILES, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -726,7 +732,7 @@ namespace WorldPackets
|
||||
class LoadCUFProfiles final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LoadCUFProfiles() : ServerPacket(SMSG_LOAD_CUF_PROFILES, 20) { }
|
||||
explicit LoadCUFProfiles() : ServerPacket(SMSG_LOAD_CUF_PROFILES, 20) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -736,7 +742,7 @@ namespace WorldPackets
|
||||
class PlayOneShotAnimKit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PlayOneShotAnimKit() : ServerPacket(SMSG_PLAY_ONE_SHOT_ANIM_KIT, 7 + 2) { }
|
||||
explicit PlayOneShotAnimKit() : ServerPacket(SMSG_PLAY_ONE_SHOT_ANIM_KIT, 7 + 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -747,7 +753,7 @@ namespace WorldPackets
|
||||
class SetAIAnimKit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetAIAnimKit() : ServerPacket(SMSG_SET_AI_ANIM_KIT, 16 + 2) { }
|
||||
explicit SetAIAnimKit() : ServerPacket(SMSG_SET_AI_ANIM_KIT, 16 + 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -758,7 +764,7 @@ namespace WorldPackets
|
||||
class SetMovementAnimKit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetMovementAnimKit() : ServerPacket(SMSG_SET_MOVEMENT_ANIM_KIT, 16 + 2) { }
|
||||
explicit SetMovementAnimKit() : ServerPacket(SMSG_SET_MOVEMENT_ANIM_KIT, 16 + 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -769,7 +775,7 @@ namespace WorldPackets
|
||||
class SetMeleeAnimKit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetMeleeAnimKit() : ServerPacket(SMSG_SET_MELEE_ANIM_KIT, 16 + 2) { }
|
||||
explicit SetMeleeAnimKit() : ServerPacket(SMSG_SET_MELEE_ANIM_KIT, 16 + 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -780,7 +786,7 @@ namespace WorldPackets
|
||||
class SetPlayHoverAnim final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetPlayHoverAnim() : ServerPacket(SMSG_SET_PLAY_HOVER_ANIM, 16 + 1) { }
|
||||
explicit SetPlayHoverAnim() : ServerPacket(SMSG_SET_PLAY_HOVER_ANIM, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -791,7 +797,7 @@ namespace WorldPackets
|
||||
class OpeningCinematic final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
OpeningCinematic(WorldPacket&& packet) : ClientPacket(CMSG_OPENING_CINEMATIC, std::move(packet)) { }
|
||||
explicit OpeningCinematic(WorldPacket&& packet) : ClientPacket(CMSG_OPENING_CINEMATIC, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -799,7 +805,7 @@ namespace WorldPackets
|
||||
class TogglePvP final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
TogglePvP(WorldPacket&& packet) : ClientPacket(CMSG_TOGGLE_PVP, std::move(packet)) { }
|
||||
explicit TogglePvP(WorldPacket&& packet) : ClientPacket(CMSG_TOGGLE_PVP, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -807,7 +813,7 @@ namespace WorldPackets
|
||||
class SetPvP final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetPvP(WorldPacket&& packet) : ClientPacket(CMSG_SET_PVP, std::move(packet)) { }
|
||||
explicit SetPvP(WorldPacket&& packet) : ClientPacket(CMSG_SET_PVP, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -817,7 +823,7 @@ namespace WorldPackets
|
||||
class SetWarMode final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetWarMode(WorldPacket&& packet) : ClientPacket(CMSG_SET_WAR_MODE, std::move(packet)) { }
|
||||
explicit SetWarMode(WorldPacket&& packet) : ClientPacket(CMSG_SET_WAR_MODE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -827,7 +833,7 @@ namespace WorldPackets
|
||||
class AccountHeirloomUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AccountHeirloomUpdate() : ServerPacket(SMSG_ACCOUNT_HEIRLOOM_UPDATE) { }
|
||||
explicit AccountHeirloomUpdate() : ServerPacket(SMSG_ACCOUNT_HEIRLOOM_UPDATE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -839,7 +845,7 @@ namespace WorldPackets
|
||||
class MountSpecial final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MountSpecial(WorldPacket&& packet) : ClientPacket(CMSG_MOUNT_SPECIAL_ANIM, std::move(packet)) { }
|
||||
explicit MountSpecial(WorldPacket&& packet) : ClientPacket(CMSG_MOUNT_SPECIAL_ANIM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -850,7 +856,7 @@ namespace WorldPackets
|
||||
class SpecialMountAnim final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SpecialMountAnim() : ServerPacket(SMSG_SPECIAL_MOUNT_ANIM, 16) { }
|
||||
explicit SpecialMountAnim() : ServerPacket(SMSG_SPECIAL_MOUNT_ANIM, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -862,7 +868,7 @@ namespace WorldPackets
|
||||
class CrossedInebriationThreshold final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CrossedInebriationThreshold() : ServerPacket(SMSG_CROSSED_INEBRIATION_THRESHOLD, 16 + 4 + 4) { }
|
||||
explicit CrossedInebriationThreshold() : ServerPacket(SMSG_CROSSED_INEBRIATION_THRESHOLD, 16 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -874,7 +880,7 @@ namespace WorldPackets
|
||||
class SetTaxiBenchmarkMode final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetTaxiBenchmarkMode(WorldPacket&& packet) : ClientPacket(CMSG_SET_TAXI_BENCHMARK_MODE, std::move(packet)) { }
|
||||
explicit SetTaxiBenchmarkMode(WorldPacket&& packet) : ClientPacket(CMSG_SET_TAXI_BENCHMARK_MODE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -884,7 +890,7 @@ namespace WorldPackets
|
||||
class OverrideLight final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
OverrideLight() : ServerPacket(SMSG_OVERRIDE_LIGHT, 4 + 4 + 4) { }
|
||||
explicit OverrideLight() : ServerPacket(SMSG_OVERRIDE_LIGHT, 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -896,9 +902,9 @@ namespace WorldPackets
|
||||
class TC_GAME_API DisplayGameError final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
DisplayGameError(GameError error) : ServerPacket(SMSG_DISPLAY_GAME_ERROR, 4 + 1), Error(error) { }
|
||||
DisplayGameError(GameError error, int32 arg) : ServerPacket(SMSG_DISPLAY_GAME_ERROR, 4 + 1 + 4), Error(error), Arg(arg) { }
|
||||
DisplayGameError(GameError error, int32 arg1, int32 arg2) : ServerPacket(SMSG_DISPLAY_GAME_ERROR, 4 + 1 + 4 + 4), Error(error), Arg(arg1), Arg2(arg2) { }
|
||||
explicit DisplayGameError(GameError error) : ServerPacket(SMSG_DISPLAY_GAME_ERROR, 4 + 1), Error(error) { }
|
||||
explicit DisplayGameError(GameError error, int32 arg) : ServerPacket(SMSG_DISPLAY_GAME_ERROR, 4 + 1 + 4), Error(error), Arg(arg) { }
|
||||
explicit DisplayGameError(GameError error, int32 arg1, int32 arg2) : ServerPacket(SMSG_DISPLAY_GAME_ERROR, 4 + 1 + 4 + 4), Error(error), Arg(arg1), Arg2(arg2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -910,7 +916,7 @@ namespace WorldPackets
|
||||
class AccountMountUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AccountMountUpdate() : ServerPacket(SMSG_ACCOUNT_MOUNT_UPDATE) { }
|
||||
explicit AccountMountUpdate() : ServerPacket(SMSG_ACCOUNT_MOUNT_UPDATE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -921,7 +927,7 @@ namespace WorldPackets
|
||||
class MountSetFavorite final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MountSetFavorite(WorldPacket&& packet) : ClientPacket(CMSG_MOUNT_SET_FAVORITE, std::move(packet)) { }
|
||||
explicit MountSetFavorite(WorldPacket&& packet) : ClientPacket(CMSG_MOUNT_SET_FAVORITE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -932,7 +938,7 @@ namespace WorldPackets
|
||||
class CloseInteraction final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
CloseInteraction(WorldPacket&& packet) : ClientPacket(CMSG_CLOSE_INTERACTION, std::move(packet)) { }
|
||||
explicit CloseInteraction(WorldPacket&& packet) : ClientPacket(CMSG_CLOSE_INTERACTION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -942,7 +948,7 @@ namespace WorldPackets
|
||||
class StartTimer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
StartTimer() : ServerPacket(SMSG_START_TIMER, 8 + 4 + 8 + 1 + 16) { }
|
||||
explicit StartTimer() : ServerPacket(SMSG_START_TIMER, 8 + 4 + 8 + 1 + 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -955,7 +961,7 @@ namespace WorldPackets
|
||||
class QueryCountdownTimer final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryCountdownTimer(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_COUNTDOWN_TIMER, std::move(packet)) { }
|
||||
explicit QueryCountdownTimer(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_COUNTDOWN_TIMER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -965,7 +971,7 @@ namespace WorldPackets
|
||||
class ConversationLineStarted final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ConversationLineStarted(WorldPacket&& packet) : ClientPacket(CMSG_CONVERSATION_LINE_STARTED, std::move(packet)) { }
|
||||
explicit ConversationLineStarted(WorldPacket&& packet) : ClientPacket(CMSG_CONVERSATION_LINE_STARTED, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -976,7 +982,7 @@ namespace WorldPackets
|
||||
class RequestLatestSplashScreen final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestLatestSplashScreen(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_LATEST_SPLASH_SCREEN, std::move(packet)) { }
|
||||
explicit RequestLatestSplashScreen(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_LATEST_SPLASH_SCREEN, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -984,7 +990,7 @@ namespace WorldPackets
|
||||
class SplashScreenShowLatest final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SplashScreenShowLatest() : ServerPacket(SMSG_SPLASH_SCREEN_SHOW_LATEST, 4) { }
|
||||
explicit SplashScreenShowLatest() : ServerPacket(SMSG_SPLASH_SCREEN_SHOW_LATEST, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -994,14 +1000,14 @@ namespace WorldPackets
|
||||
class DisplayToast final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
DisplayToast() : ServerPacket(SMSG_DISPLAY_TOAST) { }
|
||||
explicit DisplayToast() : ServerPacket(SMSG_DISPLAY_TOAST) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint64 Quantity = 0;
|
||||
::DisplayToastMethod DisplayToastMethod = ::DisplayToastMethod::DoNotDisplay;
|
||||
::DisplayToastMethod DisplayToastMethod = { };
|
||||
bool Mailed = false;
|
||||
DisplayToastType Type = DisplayToastType::Money;
|
||||
DisplayToastType Type = { };
|
||||
uint32 QuestID = 0;
|
||||
bool IsSecondaryResult = false;
|
||||
Item::ItemInstance Item;
|
||||
@@ -1014,7 +1020,7 @@ namespace WorldPackets
|
||||
class AccountWarbandSceneUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AccountWarbandSceneUpdate() : ServerPacket(SMSG_ACCOUNT_WARBAND_SCENE_UPDATE) { }
|
||||
explicit AccountWarbandSceneUpdate() : ServerPacket(SMSG_ACCOUNT_WARBAND_SCENE_UPDATE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -1024,4 +1030,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MiscPackets_h__
|
||||
#endif // TRINITYCORE_MISC_PACKETS_H
|
||||
|
||||
@@ -20,9 +20,55 @@
|
||||
#include "MoveSplineFlag.h"
|
||||
#include "MovementTypedefs.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include "Unit.h"
|
||||
#include "UnitDefines.h"
|
||||
#include "Util.h"
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementInfo::TransportInfo const& transportInfo)
|
||||
{
|
||||
bool hasPrevTime = transportInfo.prevTime != 0;
|
||||
bool hasVehicleId = transportInfo.vehicleId != 0;
|
||||
|
||||
data << transportInfo.guid; // Transport Guid
|
||||
data << transportInfo.pos.GetPositionX();
|
||||
data << transportInfo.pos.GetPositionY();
|
||||
data << transportInfo.pos.GetPositionZ();
|
||||
data << transportInfo.pos.GetOrientation();
|
||||
data << transportInfo.seat; // VehicleSeatIndex
|
||||
data << transportInfo.time; // MoveTime
|
||||
|
||||
data.WriteBit(hasPrevTime);
|
||||
data.WriteBit(hasVehicleId);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
if (hasPrevTime)
|
||||
data << transportInfo.prevTime; // PrevMoveTime
|
||||
|
||||
if (hasVehicleId)
|
||||
data << transportInfo.vehicleId; // VehicleRecID
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementInfo::TransportInfo& transportInfo)
|
||||
{
|
||||
data >> transportInfo.guid; // Transport Guid
|
||||
data >> transportInfo.pos.PositionXYZOStream();
|
||||
data >> transportInfo.seat; // VehicleSeatIndex
|
||||
data >> transportInfo.time; // MoveTime
|
||||
|
||||
bool hasPrevTime = data.ReadBit();
|
||||
bool hasVehicleId = data.ReadBit();
|
||||
|
||||
if (hasPrevTime)
|
||||
data >> transportInfo.prevTime; // PrevMoveTime
|
||||
|
||||
if (hasVehicleId)
|
||||
data >> transportInfo.vehicleId; // VehicleRecID
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo)
|
||||
{
|
||||
bool hasTransportData = !movementInfo.transport.guid.IsEmpty();
|
||||
@@ -202,58 +248,20 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo)
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementInfo::TransportInfo& transportInfo)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementForce const& movementForce)
|
||||
{
|
||||
data >> transportInfo.guid; // Transport Guid
|
||||
data >> transportInfo.pos.PositionXYZOStream();
|
||||
data >> transportInfo.seat; // VehicleSeatIndex
|
||||
data >> transportInfo.time; // MoveTime
|
||||
|
||||
bool hasPrevTime = data.ReadBit();
|
||||
bool hasVehicleId = data.ReadBit();
|
||||
|
||||
if (hasPrevTime)
|
||||
data >> transportInfo.prevTime; // PrevMoveTime
|
||||
|
||||
if (hasVehicleId)
|
||||
data >> transportInfo.vehicleId; // VehicleRecID
|
||||
|
||||
WorldPackets::Movement::CommonMovement::WriteMovementForceWithDirection(movementForce, data);
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementInfo::TransportInfo const& transportInfo)
|
||||
namespace WorldPackets::Movement
|
||||
{
|
||||
bool hasPrevTime = transportInfo.prevTime != 0;
|
||||
bool hasVehicleId = transportInfo.vehicleId != 0;
|
||||
|
||||
data << transportInfo.guid; // Transport Guid
|
||||
data << transportInfo.pos.GetPositionX();
|
||||
data << transportInfo.pos.GetPositionY();
|
||||
data << transportInfo.pos.GetPositionZ();
|
||||
data << transportInfo.pos.GetOrientation();
|
||||
data << transportInfo.seat; // VehicleSeatIndex
|
||||
data << transportInfo.time; // MoveTime
|
||||
|
||||
data.WriteBit(hasPrevTime);
|
||||
data.WriteBit(hasVehicleId);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
if (hasPrevTime)
|
||||
data << transportInfo.prevTime; // PrevMoveTime
|
||||
|
||||
if (hasVehicleId)
|
||||
data << transportInfo.vehicleId; // VehicleRecID
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::ClientPlayerMovement::Read()
|
||||
void ClientPlayerMovement::Read()
|
||||
{
|
||||
_worldPacket >> Status;
|
||||
}
|
||||
|
||||
ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFilterKey const& monsterSplineFilterKey)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MonsterSplineFilterKey const& monsterSplineFilterKey)
|
||||
{
|
||||
data << int16(monsterSplineFilterKey.Idx);
|
||||
data << uint16(monsterSplineFilterKey.Speed);
|
||||
@@ -261,14 +269,14 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFi
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFilter const& monsterSplineFilter)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MonsterSplineFilter const& monsterSplineFilter)
|
||||
{
|
||||
data << uint32(monsterSplineFilter.FilterKeys.size());
|
||||
data << Size<uint32>(monsterSplineFilter.FilterKeys);
|
||||
data << float(monsterSplineFilter.BaseSpeed);
|
||||
data << int16(monsterSplineFilter.StartOffset);
|
||||
data << float(monsterSplineFilter.DistToPrevFilterKey);
|
||||
data << int16(monsterSplineFilter.AddedToStart);
|
||||
for (WorldPackets::Movement::MonsterSplineFilterKey const& filterKey : monsterSplineFilter.FilterKeys)
|
||||
for (MonsterSplineFilterKey const& filterKey : monsterSplineFilter.FilterKeys)
|
||||
data << filterKey;
|
||||
data.WriteBits(monsterSplineFilter.FilterFlags, 2);
|
||||
data.FlushBits();
|
||||
@@ -276,7 +284,7 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MonsterSplineFi
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineSpellEffectExtraData const& spellEffectExtraData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MonsterSplineSpellEffectExtraData const& spellEffectExtraData)
|
||||
{
|
||||
data << spellEffectExtraData.TargetGUID;
|
||||
data << uint32(spellEffectExtraData.SpellVisualID);
|
||||
@@ -287,7 +295,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineSp
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineJumpExtraData const& jumpExtraData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MonsterSplineJumpExtraData const& jumpExtraData)
|
||||
{
|
||||
data << float(jumpExtraData.JumpGravity);
|
||||
data << uint32(jumpExtraData.StartTime);
|
||||
@@ -296,7 +304,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineJu
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineAnimTierTransition const& animTierTransition)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MonsterSplineAnimTierTransition const& animTierTransition)
|
||||
{
|
||||
data << int32(animTierTransition.TierTransitionID);
|
||||
data << uint32(animTierTransition.StartTime);
|
||||
@@ -306,9 +314,9 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineAn
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineUnknown901 const& unk)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MonsterSplineUnknown901 const& unk)
|
||||
{
|
||||
for (WorldPackets::Movement::MonsterSplineUnknown901::Inner const& unkInner : unk.Data)
|
||||
for (MonsterSplineUnknown901::Inner const& unkInner : unk.Data)
|
||||
{
|
||||
data << int32(unkInner.Unknown_1);
|
||||
data << unkInner.Visual;
|
||||
@@ -318,7 +326,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MonsterSplineUn
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline const& movementSpline)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementSpline const& movementSpline)
|
||||
{
|
||||
data << uint32(movementSpline.Flags);
|
||||
data << int32(movementSpline.Elapsed);
|
||||
@@ -327,16 +335,16 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline
|
||||
data << uint8(movementSpline.Mode);
|
||||
data << movementSpline.TransportGUID;
|
||||
data << int8(movementSpline.VehicleSeat);
|
||||
data.WriteBits(movementSpline.Face, 2);
|
||||
data.WriteBits(movementSpline.Points.size(), 16);
|
||||
data.WriteBit(movementSpline.VehicleExitVoluntary);
|
||||
data.WriteBit(movementSpline.TaxiSmoothing);
|
||||
data.WriteBits(movementSpline.PackedDeltas.size(), 16);
|
||||
data.WriteBit(movementSpline.SplineFilter.has_value());
|
||||
data.WriteBit(movementSpline.SpellEffectExtraData.has_value());
|
||||
data.WriteBit(movementSpline.JumpExtraData.has_value());
|
||||
data.WriteBit(movementSpline.AnimTierTransition.has_value());
|
||||
data.WriteBit(movementSpline.Unknown901.has_value());
|
||||
data << Bits<2>(movementSpline.Face);
|
||||
data << BitsSize<16>(movementSpline.Points);
|
||||
data << Bits<1>(movementSpline.VehicleExitVoluntary);
|
||||
data << Bits<1>(movementSpline.TaxiSmoothing);
|
||||
data << BitsSize<16>(movementSpline.PackedDeltas);
|
||||
data << OptionalInit(movementSpline.SplineFilter);
|
||||
data << OptionalInit(movementSpline.SpellEffectExtraData);
|
||||
data << OptionalInit(movementSpline.JumpExtraData);
|
||||
data << OptionalInit(movementSpline.AnimTierTransition);
|
||||
data << OptionalInit(movementSpline.Unknown901);
|
||||
data.FlushBits();
|
||||
|
||||
if (movementSpline.SplineFilter)
|
||||
@@ -377,18 +385,18 @@ ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementSpline
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& WorldPackets::operator<<(ByteBuffer& data, Movement::MovementMonsterSpline const& movementMonsterSpline)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementMonsterSpline const& movementMonsterSpline)
|
||||
{
|
||||
data << movementMonsterSpline.ID;
|
||||
data.WriteBit(movementMonsterSpline.CrzTeleport);
|
||||
data.WriteBits(movementMonsterSpline.StopSplineStyle, 3);
|
||||
data << Bits<1>(movementMonsterSpline.CrzTeleport);
|
||||
data << Bits<3>(movementMonsterSpline.StopSplineStyle);
|
||||
|
||||
data << movementMonsterSpline.Move;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::Movement::MoveSpline const& moveSpline, ByteBuffer& data)
|
||||
void CommonMovement::WriteCreateObjectSplineDataBlock(::Movement::MoveSpline const& moveSpline, ByteBuffer& data)
|
||||
{
|
||||
data << uint32(moveSpline.GetId()); // ID
|
||||
|
||||
@@ -406,7 +414,8 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::
|
||||
|
||||
data << dest.x << dest.y << dest.z;
|
||||
|
||||
bool hasSplineMove = data.WriteBit(!moveSpline.Finalized() && !moveSpline.splineIsFacingOnly);
|
||||
bool hasSplineMove = !moveSpline.Finalized() && !moveSpline.splineIsFacingOnly;
|
||||
data << Bits<1>(hasSplineMove);
|
||||
data.FlushBits();
|
||||
|
||||
if (hasSplineMove) // MovementSplineMove
|
||||
@@ -416,13 +425,15 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::
|
||||
data << uint32(moveSpline.Duration()); // Duration
|
||||
data << float(1.0f); // DurationModifier
|
||||
data << float(1.0f); // NextDurationModifier
|
||||
data.WriteBits(moveSpline.facing.type, 2); // Face
|
||||
bool hasFadeObjectTime = data.WriteBit(moveSpline.splineflags.FadeObject && moveSpline.effect_start_time < moveSpline.Duration());
|
||||
data.WriteBits(moveSpline.getPath().size(), 16);
|
||||
data.WriteBit(false); // HasSplineFilter
|
||||
data.WriteBit(moveSpline.spell_effect_extra.has_value()); // HasSpellEffectExtraData
|
||||
bool hasJumpExtraData = data.WriteBit(moveSpline.splineflags.Parabolic && (!moveSpline.spell_effect_extra || moveSpline.effect_start_time));
|
||||
data.WriteBit(moveSpline.anim_tier.has_value()); // HasAnimTierTransition
|
||||
data << Bits<2>(moveSpline.facing.type); // Face
|
||||
bool hasFadeObjectTime = moveSpline.splineflags.FadeObject && moveSpline.effect_start_time < moveSpline.Duration();
|
||||
data << Bits<1>(hasFadeObjectTime);
|
||||
data << BitsSize<16>(moveSpline.getPath());
|
||||
data << Bits<1>(false); // HasSplineFilter
|
||||
data << OptionalInit(moveSpline.spell_effect_extra); // HasSpellEffectExtraData
|
||||
bool hasJumpExtraData = moveSpline.splineflags.Parabolic && (!moveSpline.spell_effect_extra || moveSpline.effect_start_time);
|
||||
data << Bits<1>(hasJumpExtraData);
|
||||
data << OptionalInit(moveSpline.anim_tier); // HasAnimTierTransition
|
||||
data.WriteBit(false); // HasUnknown901
|
||||
data.FlushBits();
|
||||
|
||||
@@ -501,13 +512,13 @@ void WorldPackets::Movement::CommonMovement::WriteCreateObjectSplineDataBlock(::
|
||||
}
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::CommonMovement::WriteCreateObjectAreaTriggerSpline(::Movement::Spline<int32> const& spline, ByteBuffer& data)
|
||||
void CommonMovement::WriteCreateObjectAreaTriggerSpline(::Movement::Spline<int32> const& spline, ByteBuffer& data)
|
||||
{
|
||||
data.WriteBits(spline.getPoints().size(), 16);
|
||||
data << BitsSize<16>(spline.getPoints());
|
||||
data.append(reinterpret_cast<float const*>(spline.getPoints().data()), spline.getPoints().size() * 3);
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::CommonMovement::WriteMovementForceWithDirection(MovementForce const& movementForce, ByteBuffer& data, Position const* objectPosition /*= nullptr*/)
|
||||
void CommonMovement::WriteMovementForceWithDirection(MovementForce const& movementForce, ByteBuffer& data, Position const* objectPosition /*= nullptr*/)
|
||||
{
|
||||
data << movementForce.ID;
|
||||
data << movementForce.Origin;
|
||||
@@ -545,14 +556,14 @@ void WorldPackets::Movement::CommonMovement::WriteMovementForceWithDirection(Mov
|
||||
data << int32(movementForce.Unknown1110_1);
|
||||
data << int32(movementForce.Unused1110);
|
||||
data << uint32(movementForce.Flags);
|
||||
data.WriteBits(AsUnderlyingType(movementForce.Type), 2);
|
||||
data << Bits<2>(movementForce.Type);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveSpline const& moveSpline)
|
||||
void MonsterMove::InitializeSplineData(::Movement::MoveSpline const& moveSpline)
|
||||
{
|
||||
SplineData.ID = moveSpline.m_Id;
|
||||
WorldPackets::Movement::MovementSpline& movementSpline = SplineData.Move;
|
||||
MovementSpline& movementSpline = SplineData.Move;
|
||||
|
||||
::Movement::MoveSplineFlag splineFlags = moveSpline.splineflags;
|
||||
movementSpline.Flags = uint32(splineFlags & ~::Movement::MoveSplineFlagEnum::Mask_No_Monster_Move);
|
||||
@@ -621,15 +632,16 @@ void WorldPackets::Movement::MonsterMove::InitializeSplineData(::Movement::MoveS
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MonsterMove::Write()
|
||||
WorldPacket const* MonsterMove::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << Pos;
|
||||
_worldPacket << SplineData;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::FlightSplineSync::Write()
|
||||
WorldPacket const* FlightSplineSync::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
_worldPacket << float(SplineDist);
|
||||
@@ -637,66 +649,73 @@ WorldPacket const* WorldPackets::Movement::FlightSplineSync::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSplineSetSpeed::Write()
|
||||
WorldPacket const* MoveSplineSetSpeed::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << Speed;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSetSpeed::Write()
|
||||
WorldPacket const* MoveSetSpeed::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << SequenceIndex;
|
||||
_worldPacket << Speed;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdateSpeed::Write()
|
||||
WorldPacket const* MoveUpdateSpeed::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
_worldPacket << Speed;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::SetAdvFlyingSpeed::Write()
|
||||
WorldPacket const* SetAdvFlyingSpeed::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
_worldPacket << float(Speed);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::SetAdvFlyingSpeedRange::Write()
|
||||
WorldPacket const* SetAdvFlyingSpeedRange::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
_worldPacket << float(SpeedMin);
|
||||
_worldPacket << float(SpeedMax);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSplineSetFlag::Write()
|
||||
WorldPacket const* MoveSplineSetFlag::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSetFlag::Write()
|
||||
WorldPacket const* MoveSetFlag::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << SequenceIndex;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdate::Write()
|
||||
WorldPacket const* MoveUpdate::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::TransferPending::Write()
|
||||
WorldPacket const* TransferPending::Write()
|
||||
{
|
||||
_worldPacket << int32(MapID);
|
||||
_worldPacket << OldMapPosition;
|
||||
@@ -720,17 +739,18 @@ WorldPacket const* WorldPackets::Movement::TransferPending::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::TransferAborted::Write()
|
||||
WorldPacket const* TransferAborted::Write()
|
||||
{
|
||||
_worldPacket << uint32(MapID);
|
||||
_worldPacket << uint8(Arg);
|
||||
_worldPacket << int32(MapDifficultyXConditionID);
|
||||
_worldPacket.WriteBits(TransfertAbort, 6);
|
||||
_worldPacket << Bits<6>(TransfertAbort);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::TeleportLocation const& teleportLocation)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TeleportLocation const& teleportLocation)
|
||||
{
|
||||
data << teleportLocation.Pos;
|
||||
data << int32(teleportLocation.Unused901_1);
|
||||
@@ -739,17 +759,18 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::TeleportLocatio
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::NewWorld::Write()
|
||||
WorldPacket const* NewWorld::Write()
|
||||
{
|
||||
_worldPacket << int32(MapID);
|
||||
_worldPacket << Loc;
|
||||
_worldPacket << uint32(Reason);
|
||||
_worldPacket << MovementOffset;
|
||||
_worldPacket << int32(Counter);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveTeleport::Write()
|
||||
WorldPacket const* MoveTeleport::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
@@ -757,15 +778,15 @@ WorldPacket const* WorldPackets::Movement::MoveTeleport::Write()
|
||||
_worldPacket << float(Facing);
|
||||
_worldPacket << uint8(PreloadWorld);
|
||||
|
||||
_worldPacket.WriteBit(TransportGUID.has_value());
|
||||
_worldPacket.WriteBit(Vehicle.has_value());
|
||||
_worldPacket << OptionalInit(TransportGUID);
|
||||
_worldPacket << OptionalInit(Vehicle);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (Vehicle)
|
||||
{
|
||||
_worldPacket << uint8(Vehicle->VehicleSeatIndex);
|
||||
_worldPacket.WriteBit(Vehicle->VehicleExitVoluntary);
|
||||
_worldPacket.WriteBit(Vehicle->VehicleExitTeleport);
|
||||
_worldPacket << Bits<1>(Vehicle->VehicleExitVoluntary);
|
||||
_worldPacket << Bits<1>(Vehicle->VehicleExitTeleport);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
@@ -775,12 +796,6 @@ WorldPacket const* WorldPackets::Movement::MoveTeleport::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementForce const& movementForce)
|
||||
{
|
||||
WorldPackets::Movement::CommonMovement::WriteMovementForceWithDirection(movementForce, data);
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementForce& movementForce)
|
||||
{
|
||||
data >> movementForce.ID;
|
||||
@@ -792,25 +807,25 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementForce& movementForce)
|
||||
data >> movementForce.Unknown1110_1;
|
||||
data >> movementForce.Unused1110;
|
||||
data >> movementForce.Flags;
|
||||
movementForce.Type = MovementForceType(data.ReadBits(2));
|
||||
data >> Bits<2>(movementForce.Type);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdateTeleport::Write()
|
||||
WorldPacket const* MoveUpdateTeleport::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
|
||||
_worldPacket << uint32(MovementForces ? MovementForces->size() : 0);
|
||||
_worldPacket.WriteBit(WalkSpeed.has_value());
|
||||
_worldPacket.WriteBit(RunSpeed.has_value());
|
||||
_worldPacket.WriteBit(RunBackSpeed.has_value());
|
||||
_worldPacket.WriteBit(SwimSpeed.has_value());
|
||||
_worldPacket.WriteBit(SwimBackSpeed.has_value());
|
||||
_worldPacket.WriteBit(FlightSpeed.has_value());
|
||||
_worldPacket.WriteBit(FlightBackSpeed.has_value());
|
||||
_worldPacket.WriteBit(TurnRate.has_value());
|
||||
_worldPacket.WriteBit(PitchRate.has_value());
|
||||
_worldPacket << OptionalInit(WalkSpeed);
|
||||
_worldPacket << OptionalInit(RunSpeed);
|
||||
_worldPacket << OptionalInit(RunBackSpeed);
|
||||
_worldPacket << OptionalInit(SwimSpeed);
|
||||
_worldPacket << OptionalInit(SwimBackSpeed);
|
||||
_worldPacket << OptionalInit(FlightSpeed);
|
||||
_worldPacket << OptionalInit(FlightBackSpeed);
|
||||
_worldPacket << OptionalInit(TurnRate);
|
||||
_worldPacket << OptionalInit(PitchRate);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (MovementForces)
|
||||
@@ -847,51 +862,52 @@ WorldPacket const* WorldPackets::Movement::MoveUpdateTeleport::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveTeleportAck::Read()
|
||||
void MoveTeleportAck::Read()
|
||||
{
|
||||
_worldPacket >> MoverGUID;
|
||||
_worldPacket >> AckIndex;
|
||||
_worldPacket >> MoveTime;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Movement::MovementAck& ack)
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementAck& ack)
|
||||
{
|
||||
data >> ack.Status;
|
||||
data >> ack.AckIndex;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MovementAckMessage::Read()
|
||||
void MovementAckMessage::Read()
|
||||
{
|
||||
_worldPacket >> Ack;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MovementSpeedAck::Read()
|
||||
void MovementSpeedAck::Read()
|
||||
{
|
||||
_worldPacket >> Ack;
|
||||
_worldPacket >> Speed;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MovementSpeedRangeAck::Read()
|
||||
void MovementSpeedRangeAck::Read()
|
||||
{
|
||||
_worldPacket >> Ack;
|
||||
_worldPacket >> SpeedMin;
|
||||
_worldPacket >> SpeedMax;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::SetActiveMover::Read()
|
||||
void SetActiveMover::Read()
|
||||
{
|
||||
_worldPacket >> ActiveMover;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSetActiveMover::Write()
|
||||
WorldPacket const* MoveSetActiveMover::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveKnockBackSpeeds const& speeds)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MoveKnockBackSpeeds const& speeds)
|
||||
{
|
||||
data << float(speeds.HorzSpeed);
|
||||
data << float(speeds.VertSpeed);
|
||||
@@ -899,7 +915,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveKnockBackSp
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Movement::MoveKnockBackSpeeds& speeds)
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MoveKnockBackSpeeds& speeds)
|
||||
{
|
||||
data >> speeds.HorzSpeed;
|
||||
data >> speeds.VertSpeed;
|
||||
@@ -907,7 +923,7 @@ ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Movement::MoveKnockBackSp
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveKnockBack::Write()
|
||||
WorldPacket const* MoveKnockBack::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
@@ -917,25 +933,22 @@ WorldPacket const* WorldPackets::Movement::MoveKnockBack::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdateKnockBack::Write()
|
||||
WorldPacket const* MoveUpdateKnockBack::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveKnockBackAck::Read()
|
||||
void MoveKnockBackAck::Read()
|
||||
{
|
||||
_worldPacket >> Ack;
|
||||
bool hasSpeeds = _worldPacket.ReadBit();
|
||||
if (hasSpeeds)
|
||||
{
|
||||
Speeds.emplace();
|
||||
_worldPacket >> OptionalInit(Speeds);
|
||||
if (Speeds)
|
||||
_worldPacket >> *Speeds;
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSetCollisionHeight::Write()
|
||||
WorldPacket const* MoveSetCollisionHeight::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
@@ -944,12 +957,11 @@ WorldPacket const* WorldPackets::Movement::MoveSetCollisionHeight::Write()
|
||||
_worldPacket << uint8(Reason);
|
||||
_worldPacket << uint32(MountDisplayID);
|
||||
_worldPacket << int32(ScaleDuration);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdateCollisionHeight::Write()
|
||||
WorldPacket const* MoveUpdateCollisionHeight::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
_worldPacket << float(Height);
|
||||
@@ -958,7 +970,7 @@ WorldPacket const* WorldPackets::Movement::MoveUpdateCollisionHeight::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveApplyMovementForce::Write()
|
||||
WorldPacket const* MoveApplyMovementForce::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << SequenceIndex;
|
||||
@@ -967,13 +979,13 @@ WorldPacket const* WorldPackets::Movement::MoveApplyMovementForce::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveApplyMovementForceAck::Read()
|
||||
void MoveApplyMovementForceAck::Read()
|
||||
{
|
||||
_worldPacket >> Ack;
|
||||
_worldPacket >> Force;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveRemoveMovementForce::Write()
|
||||
WorldPacket const* MoveRemoveMovementForce::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << SequenceIndex;
|
||||
@@ -982,13 +994,13 @@ WorldPacket const* WorldPackets::Movement::MoveRemoveMovementForce::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveRemoveMovementForceAck::Read()
|
||||
void MoveRemoveMovementForceAck::Read()
|
||||
{
|
||||
_worldPacket >> Ack;
|
||||
_worldPacket >> ID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdateApplyMovementForce::Write()
|
||||
WorldPacket const* MoveUpdateApplyMovementForce::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
_worldPacket << *Force;
|
||||
@@ -996,7 +1008,7 @@ WorldPacket const* WorldPackets::Movement::MoveUpdateApplyMovementForce::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveUpdateRemoveMovementForce::Write()
|
||||
WorldPacket const* MoveUpdateRemoveMovementForce::Write()
|
||||
{
|
||||
_worldPacket << *Status;
|
||||
_worldPacket << TriggerGUID;
|
||||
@@ -1004,7 +1016,7 @@ WorldPacket const* WorldPackets::Movement::MoveUpdateRemoveMovementForce::Write(
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveSetCollisionHeightAck::Read()
|
||||
void MoveSetCollisionHeightAck::Read()
|
||||
{
|
||||
_worldPacket >> Data;
|
||||
_worldPacket >> Height;
|
||||
@@ -1012,13 +1024,13 @@ void WorldPackets::Movement::MoveSetCollisionHeightAck::Read()
|
||||
_worldPacket >> As<uint8>(Reason);
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveTimeSkipped::Read()
|
||||
void MoveTimeSkipped::Read()
|
||||
{
|
||||
_worldPacket >> MoverGUID;
|
||||
_worldPacket >> TimeSkipped;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSkipTime::Write()
|
||||
WorldPacket const* MoveSkipTime::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << TimeSkipped;
|
||||
@@ -1026,76 +1038,76 @@ WorldPacket const* WorldPackets::Movement::MoveSkipTime::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::SummonResponse::Read()
|
||||
void SummonResponse::Read()
|
||||
{
|
||||
_worldPacket >> SummonerGUID;
|
||||
Accept = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Accept);
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::ControlUpdate::Write()
|
||||
WorldPacket const* ControlUpdate::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
_worldPacket.WriteBit(On);
|
||||
_worldPacket << Bits<1>(On);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveSplineDone::Read()
|
||||
void MoveSplineDone::Read()
|
||||
{
|
||||
_worldPacket >> Status;
|
||||
_worldPacket >> SplineID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::SummonRequest::Write()
|
||||
WorldPacket const* SummonRequest::Write()
|
||||
{
|
||||
_worldPacket << SummonerGUID;
|
||||
_worldPacket << uint32(SummonerVirtualRealmAddress);
|
||||
_worldPacket << int32(AreaID);
|
||||
_worldPacket << uint8(Reason);
|
||||
_worldPacket.WriteBit(SkipStartingArea);
|
||||
_worldPacket << Bits<1>(SkipStartingArea);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::SuspendToken::Write()
|
||||
WorldPacket const* SuspendToken::Write()
|
||||
{
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
_worldPacket.WriteBits(Reason, 2);
|
||||
_worldPacket << Bits<2>(Reason);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::SuspendTokenResponse::Read()
|
||||
void SuspendTokenResponse::Read()
|
||||
{
|
||||
_worldPacket >> SequenceIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::ResumeToken::Write()
|
||||
WorldPacket const* ResumeToken::Write()
|
||||
{
|
||||
_worldPacket << uint32(SequenceIndex);
|
||||
_worldPacket.WriteBits(Reason, 2);
|
||||
_worldPacket << Bits<2>(Reason);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveSetCompoundState::MoveStateChange const& stateChange)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MoveSetCompoundState::MoveStateChange const& stateChange)
|
||||
{
|
||||
data << uint32(stateChange.MessageID);
|
||||
data << uint32(stateChange.SequenceIndex);
|
||||
data.WriteBit(stateChange.Speed.has_value());
|
||||
data.WriteBit(stateChange.Range.has_value());
|
||||
data.WriteBit(stateChange.KnockBack.has_value());
|
||||
data.WriteBit(stateChange.VehicleRecID.has_value());
|
||||
data.WriteBit(stateChange.CollisionHeight.has_value());
|
||||
data.WriteBit(stateChange.MovementForce_.has_value());
|
||||
data.WriteBit(stateChange.MovementForceGUID.has_value());
|
||||
data.WriteBit(stateChange.MovementInertiaID.has_value());
|
||||
data.WriteBit(stateChange.MovementInertiaLifetimeMs.has_value());
|
||||
data.WriteBit(stateChange.DriveCapabilityRecID.has_value());
|
||||
data << OptionalInit(stateChange.Speed);
|
||||
data << OptionalInit(stateChange.Range);
|
||||
data << OptionalInit(stateChange.KnockBack);
|
||||
data << OptionalInit(stateChange.VehicleRecID);
|
||||
data << OptionalInit(stateChange.CollisionHeight);
|
||||
data << OptionalInit(stateChange.MovementForce_);
|
||||
data << OptionalInit(stateChange.MovementForceGUID);
|
||||
data << OptionalInit(stateChange.MovementInertiaID);
|
||||
data << OptionalInit(stateChange.MovementInertiaLifetimeMs);
|
||||
data << OptionalInit(stateChange.DriveCapabilityRecID);
|
||||
data.FlushBits();
|
||||
|
||||
if (stateChange.MovementForce_)
|
||||
@@ -1142,17 +1154,18 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveSetCompound
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Movement::MoveSetCompoundState::Write()
|
||||
WorldPacket const* MoveSetCompoundState::Write()
|
||||
{
|
||||
_worldPacket << MoverGUID;
|
||||
_worldPacket << uint32(StateChanges.size());
|
||||
_worldPacket << Size<uint32>(StateChanges);
|
||||
for (MoveStateChange const& stateChange : StateChanges)
|
||||
_worldPacket << stateChange;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Movement::MoveInitActiveMoverComplete::Read()
|
||||
void MoveInitActiveMoverComplete::Read()
|
||||
{
|
||||
_worldPacket >> Ticks;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MovementPackets_h__
|
||||
#define MovementPackets_h__
|
||||
#ifndef TRINITYCORE_MOVEMENT_PACKETS_H
|
||||
#define TRINITYCORE_MOVEMENT_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "CombatLogPacketsCommon.h"
|
||||
#include "Object.h"
|
||||
#include "MovementInfo.h"
|
||||
#include "Optional.h"
|
||||
|
||||
namespace Movement
|
||||
@@ -43,7 +43,7 @@ namespace WorldPackets
|
||||
class ClientPlayerMovement final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ClientPlayerMovement(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
explicit ClientPlayerMovement(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace WorldPackets
|
||||
class TC_GAME_API MoveUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdate() : ServerPacket(SMSG_MOVE_UPDATE) { }
|
||||
explicit MoveUpdate() : ServerPacket(SMSG_MOVE_UPDATE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace WorldPackets
|
||||
class MonsterMove final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MonsterMove() : ServerPacket(SMSG_ON_MONSTER_MOVE) { }
|
||||
explicit MonsterMove() : ServerPacket(SMSG_ON_MONSTER_MOVE) { }
|
||||
|
||||
void InitializeSplineData(::Movement::MoveSpline const& moveSpline);
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace WorldPackets
|
||||
class FlightSplineSync final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
FlightSplineSync() : ServerPacket(SMSG_FLIGHT_SPLINE_SYNC, 16 + 4) { }
|
||||
explicit FlightSplineSync() : ServerPacket(SMSG_FLIGHT_SPLINE_SYNC, 16 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace WorldPackets
|
||||
class MoveSplineSetSpeed : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSplineSetSpeed(OpcodeServer opcode) : ServerPacket(opcode, 12) { }
|
||||
explicit MoveSplineSetSpeed(OpcodeServer opcode) : ServerPacket(opcode, 12) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace WorldPackets
|
||||
class MoveSetSpeed : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSetSpeed(OpcodeServer opcode) : ServerPacket(opcode) { }
|
||||
explicit MoveSetSpeed(OpcodeServer opcode) : ServerPacket(opcode) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace WorldPackets
|
||||
class MoveUpdateSpeed : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdateSpeed(OpcodeServer opcode) : ServerPacket(opcode) { }
|
||||
explicit MoveUpdateSpeed(OpcodeServer opcode) : ServerPacket(opcode) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace WorldPackets
|
||||
class MoveSplineSetFlag final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSplineSetFlag(OpcodeServer opcode) : ServerPacket(opcode, 8) { }
|
||||
explicit MoveSplineSetFlag(OpcodeServer opcode) : ServerPacket(opcode, 8) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace WorldPackets
|
||||
class MoveSetFlag final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSetFlag(OpcodeServer opcode) : ServerPacket(opcode, 12) { }
|
||||
explicit MoveSetFlag(OpcodeServer opcode) : ServerPacket(opcode, 12) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace WorldPackets
|
||||
class TransferPending final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TransferPending() : ServerPacket(SMSG_TRANSFER_PENDING, 16) { }
|
||||
explicit TransferPending() : ServerPacket(SMSG_TRANSFER_PENDING, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -281,7 +281,7 @@ namespace WorldPackets
|
||||
class TransferAborted final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TransferAborted() : ServerPacket(SMSG_TRANSFER_ABORTED, 4 + 1 + 4 + 1) { }
|
||||
explicit TransferAborted() : ServerPacket(SMSG_TRANSFER_ABORTED, 4 + 1 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace WorldPackets
|
||||
class NewWorld final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
NewWorld() : ServerPacket(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4) { }
|
||||
explicit NewWorld() : ServerPacket(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -315,7 +315,7 @@ namespace WorldPackets
|
||||
class WorldPortResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
WorldPortResponse(WorldPacket&& packet) : ClientPacket(CMSG_WORLD_PORT_RESPONSE, std::move(packet)) { }
|
||||
explicit WorldPortResponse(WorldPacket&& packet) : ClientPacket(CMSG_WORLD_PORT_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -330,7 +330,7 @@ namespace WorldPackets
|
||||
class MoveTeleport final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveTeleport() : ServerPacket(SMSG_MOVE_TELEPORT, 12+4+16+16+4) { }
|
||||
explicit MoveTeleport() : ServerPacket(SMSG_MOVE_TELEPORT, 12+4+16+16+4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -346,7 +346,7 @@ namespace WorldPackets
|
||||
class MoveUpdateTeleport final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdateTeleport() : ServerPacket(SMSG_MOVE_UPDATE_TELEPORT) { }
|
||||
explicit MoveUpdateTeleport() : ServerPacket(SMSG_MOVE_UPDATE_TELEPORT) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -366,7 +366,7 @@ namespace WorldPackets
|
||||
class MoveApplyMovementForce final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveApplyMovementForce() : ServerPacket(SMSG_MOVE_APPLY_MOVEMENT_FORCE, 16 + 4 + 16 + 12 + 12 + 4 + 4 + 1) { }
|
||||
explicit MoveApplyMovementForce() : ServerPacket(SMSG_MOVE_APPLY_MOVEMENT_FORCE, 16 + 4 + 16 + 12 + 12 + 4 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -378,7 +378,7 @@ namespace WorldPackets
|
||||
class MoveApplyMovementForceAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveApplyMovementForceAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_APPLY_MOVEMENT_FORCE_ACK, std::move(packet)) { }
|
||||
explicit MoveApplyMovementForceAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_APPLY_MOVEMENT_FORCE_ACK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace WorldPackets
|
||||
class MoveRemoveMovementForce final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveRemoveMovementForce() : ServerPacket(SMSG_MOVE_REMOVE_MOVEMENT_FORCE, 16 + 4 + 16) { }
|
||||
explicit MoveRemoveMovementForce() : ServerPacket(SMSG_MOVE_REMOVE_MOVEMENT_FORCE, 16 + 4 + 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -401,7 +401,7 @@ namespace WorldPackets
|
||||
class MoveRemoveMovementForceAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveRemoveMovementForceAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_REMOVE_MOVEMENT_FORCE_ACK, std::move(packet)) { }
|
||||
explicit MoveRemoveMovementForceAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_REMOVE_MOVEMENT_FORCE_ACK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -412,7 +412,7 @@ namespace WorldPackets
|
||||
class MoveUpdateApplyMovementForce final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdateApplyMovementForce() : ServerPacket(SMSG_MOVE_UPDATE_APPLY_MOVEMENT_FORCE, sizeof(MovementInfo) + 16 + 12 + 12 + 4 + 4 + 1) { }
|
||||
explicit MoveUpdateApplyMovementForce() : ServerPacket(SMSG_MOVE_UPDATE_APPLY_MOVEMENT_FORCE, sizeof(MovementInfo) + 16 + 12 + 12 + 4 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -423,7 +423,7 @@ namespace WorldPackets
|
||||
class MoveUpdateRemoveMovementForce final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdateRemoveMovementForce() : ServerPacket(SMSG_MOVE_UPDATE_REMOVE_MOVEMENT_FORCE, sizeof(MovementInfo) + 16) { }
|
||||
explicit MoveUpdateRemoveMovementForce() : ServerPacket(SMSG_MOVE_UPDATE_REMOVE_MOVEMENT_FORCE, sizeof(MovementInfo) + 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -434,7 +434,7 @@ namespace WorldPackets
|
||||
class MoveTeleportAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveTeleportAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_TELEPORT_ACK, std::move(packet)) { }
|
||||
explicit MoveTeleportAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_TELEPORT_ACK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -446,7 +446,7 @@ namespace WorldPackets
|
||||
class MovementAckMessage final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MovementAckMessage(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
explicit MovementAckMessage(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -456,7 +456,7 @@ namespace WorldPackets
|
||||
class MovementSpeedAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MovementSpeedAck(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
explicit MovementSpeedAck(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace WorldPackets
|
||||
class MovementSpeedRangeAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MovementSpeedRangeAck(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
explicit MovementSpeedRangeAck(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -479,7 +479,7 @@ namespace WorldPackets
|
||||
class SetActiveMover final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetActiveMover(WorldPacket&& packet) : ClientPacket(CMSG_SET_ACTIVE_MOVER, std::move(packet)) { }
|
||||
explicit SetActiveMover(WorldPacket&& packet) : ClientPacket(CMSG_SET_ACTIVE_MOVER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -489,7 +489,7 @@ namespace WorldPackets
|
||||
class MoveSetActiveMover final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSetActiveMover() : ServerPacket(SMSG_MOVE_SET_ACTIVE_MOVER, 8) { }
|
||||
explicit MoveSetActiveMover() : ServerPacket(SMSG_MOVE_SET_ACTIVE_MOVER, 8) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -505,7 +505,7 @@ namespace WorldPackets
|
||||
class MoveKnockBack final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveKnockBack() : ServerPacket(SMSG_MOVE_KNOCK_BACK, 16 + 8 + 4 + 4 + 4) { }
|
||||
explicit MoveKnockBack() : ServerPacket(SMSG_MOVE_KNOCK_BACK, 16 + 8 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -518,7 +518,7 @@ namespace WorldPackets
|
||||
class MoveUpdateKnockBack final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdateKnockBack() : ServerPacket(SMSG_MOVE_UPDATE_KNOCK_BACK) { }
|
||||
explicit MoveUpdateKnockBack() : ServerPacket(SMSG_MOVE_UPDATE_KNOCK_BACK) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -528,7 +528,7 @@ namespace WorldPackets
|
||||
class MoveKnockBackAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveKnockBackAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_KNOCK_BACK_ACK, std::move(packet)) { }
|
||||
explicit MoveKnockBackAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_KNOCK_BACK_ACK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -546,7 +546,7 @@ namespace WorldPackets
|
||||
class MoveSetCollisionHeight final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSetCollisionHeight() : ServerPacket(SMSG_MOVE_SET_COLLISION_HEIGHT, 4 + 16 + 4 + 1 + 4 + 4) { }
|
||||
explicit MoveSetCollisionHeight() : ServerPacket(SMSG_MOVE_SET_COLLISION_HEIGHT, 4 + 16 + 4 + 1 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -562,7 +562,7 @@ namespace WorldPackets
|
||||
class MoveUpdateCollisionHeight final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveUpdateCollisionHeight() : ServerPacket(SMSG_MOVE_UPDATE_COLLISION_HEIGHT) { }
|
||||
explicit MoveUpdateCollisionHeight() : ServerPacket(SMSG_MOVE_UPDATE_COLLISION_HEIGHT) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -574,7 +574,7 @@ namespace WorldPackets
|
||||
class MoveSetCollisionHeightAck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveSetCollisionHeightAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_SET_COLLISION_HEIGHT_ACK, std::move(packet)) { }
|
||||
explicit MoveSetCollisionHeightAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_SET_COLLISION_HEIGHT_ACK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -587,7 +587,7 @@ namespace WorldPackets
|
||||
class MoveTimeSkipped final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveTimeSkipped(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_TIME_SKIPPED, std::move(packet)) { }
|
||||
explicit MoveTimeSkipped(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_TIME_SKIPPED, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -598,7 +598,7 @@ namespace WorldPackets
|
||||
class MoveSkipTime final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MoveSkipTime() : ServerPacket(SMSG_MOVE_SKIP_TIME, 16 + 4) { }
|
||||
explicit MoveSkipTime() : ServerPacket(SMSG_MOVE_SKIP_TIME, 16 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -609,7 +609,7 @@ namespace WorldPackets
|
||||
class SummonResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SummonResponse(WorldPacket&& packet) : ClientPacket(CMSG_SUMMON_RESPONSE, std::move(packet)) { }
|
||||
explicit SummonResponse(WorldPacket&& packet) : ClientPacket(CMSG_SUMMON_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace WorldPackets
|
||||
class TC_GAME_API ControlUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ControlUpdate() : ServerPacket(SMSG_CONTROL_UPDATE, 16 + 1) { }
|
||||
explicit ControlUpdate() : ServerPacket(SMSG_CONTROL_UPDATE, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -631,7 +631,7 @@ namespace WorldPackets
|
||||
class MoveSplineDone final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveSplineDone(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_SPLINE_DONE, std::move(packet)) { }
|
||||
explicit MoveSplineDone(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_SPLINE_DONE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -648,7 +648,7 @@ namespace WorldPackets
|
||||
SCENARIO = 1
|
||||
};
|
||||
|
||||
SummonRequest() : ServerPacket(SMSG_SUMMON_REQUEST, 16 + 4 + 4 + 1) { }
|
||||
explicit SummonRequest() : ServerPacket(SMSG_SUMMON_REQUEST, 16 + 4 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -662,7 +662,7 @@ namespace WorldPackets
|
||||
class SuspendToken final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SuspendToken() : ServerPacket(SMSG_SUSPEND_TOKEN, 4 + 1) { }
|
||||
explicit SuspendToken() : ServerPacket(SMSG_SUSPEND_TOKEN, 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -673,7 +673,7 @@ namespace WorldPackets
|
||||
class SuspendTokenResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SuspendTokenResponse(WorldPacket&& packet) : ClientPacket(CMSG_SUSPEND_TOKEN_RESPONSE, std::move(packet)) { }
|
||||
explicit SuspendTokenResponse(WorldPacket&& packet) : ClientPacket(CMSG_SUSPEND_TOKEN_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -683,7 +683,7 @@ namespace WorldPackets
|
||||
class ResumeToken final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ResumeToken() : ServerPacket(SMSG_RESUME_TOKEN, 4 + 1) { }
|
||||
explicit ResumeToken() : ServerPacket(SMSG_RESUME_TOKEN, 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -732,7 +732,7 @@ namespace WorldPackets
|
||||
Optional<int32> DriveCapabilityRecID;
|
||||
};
|
||||
|
||||
MoveSetCompoundState() : ServerPacket(SMSG_MOVE_SET_COMPOUND_STATE, 4 + 1) { }
|
||||
explicit MoveSetCompoundState() : ServerPacket(SMSG_MOVE_SET_COMPOUND_STATE, 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -743,26 +743,19 @@ namespace WorldPackets
|
||||
class MoveInitActiveMoverComplete final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MoveInitActiveMoverComplete(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_INIT_ACTIVE_MOVER_COMPLETE, std::move(packet)) { }
|
||||
explicit MoveInitActiveMoverComplete(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_INIT_ACTIVE_MOVER_COMPLETE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
uint32 Ticks = 0;
|
||||
};
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, Movement::MonsterSplineFilterKey const& monsterSplineFilterKey);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, Movement::MonsterSplineFilter const& monsterSplineFilter);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, Movement::MovementSpline const& movementSpline);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, Movement::MovementMonsterSpline const& movementMonsterSpline);
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementAck& ack);
|
||||
}
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo);
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, MovementInfo::TransportInfo& transportInfo);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementInfo::TransportInfo const& transportInfo);
|
||||
ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Movement::MovementAck& movementAck);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, MovementForce const& movementForce);
|
||||
|
||||
#endif // MovementPackets_h__
|
||||
#endif // TRINITYCORE_MOVEMENT_PACKETS_H
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
|
||||
#include "MythicPlusPacketsCommon.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace MythicPlus
|
||||
namespace WorldPackets::MythicPlus
|
||||
{
|
||||
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreMapSummary const& dungeonScoreMapSummary)
|
||||
{
|
||||
@@ -28,7 +26,7 @@ ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreMapSummary const& dungeonSc
|
||||
data << int32(dungeonScoreMapSummary.BestRunLevel);
|
||||
data << int32(dungeonScoreMapSummary.BestRunDurationMS);
|
||||
data << uint8(dungeonScoreMapSummary.Unknown1110);
|
||||
data.WriteBit(dungeonScoreMapSummary.FinishedSuccess);
|
||||
data << Bits<1>(dungeonScoreMapSummary.FinishedSuccess);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
@@ -38,7 +36,7 @@ ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreSummary const& dungeonScore
|
||||
{
|
||||
data << float(dungeonScoreSummary.OverallScoreCurrentSeason);
|
||||
data << float(dungeonScoreSummary.LadderScoreCurrentSeason);
|
||||
data << uint32(dungeonScoreSummary.Runs.size());
|
||||
data << Size<uint32>(dungeonScoreSummary.Runs);
|
||||
for (DungeonScoreMapSummary const& dungeonScoreMapSummary : dungeonScoreSummary.Runs)
|
||||
data << dungeonScoreMapSummary;
|
||||
|
||||
@@ -71,12 +69,12 @@ ByteBuffer& operator<<(ByteBuffer& data, MythicPlusRun const& mythicPlusRun)
|
||||
data << mythicPlusRun.CompletionDate;
|
||||
data << int32(mythicPlusRun.Season);
|
||||
data.append(mythicPlusRun.KeystoneAffixIDs.data(), mythicPlusRun.KeystoneAffixIDs.size());
|
||||
data << uint32(mythicPlusRun.Members.size());
|
||||
data << Size<uint32>(mythicPlusRun.Members);
|
||||
data << float(mythicPlusRun.RunScore);
|
||||
for (MythicPlusMember const& member : mythicPlusRun.Members)
|
||||
data << member;
|
||||
|
||||
data.WriteBit(mythicPlusRun.Completed);
|
||||
data << Bits<1>(mythicPlusRun.Completed);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
@@ -94,7 +92,7 @@ ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreBestRunForAffix const& dung
|
||||
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreMapData const& dungeonScoreMapData)
|
||||
{
|
||||
data << int32(dungeonScoreMapData.MapChallengeModeID);
|
||||
data << uint32(dungeonScoreMapData.BestRuns.size());
|
||||
data << Size<uint32>(dungeonScoreMapData.BestRuns);
|
||||
data << float(dungeonScoreMapData.OverAllScore);
|
||||
for (DungeonScoreBestRunForAffix const& bestRun : dungeonScoreMapData.BestRuns)
|
||||
data << bestRun;
|
||||
@@ -105,8 +103,8 @@ ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreMapData const& dungeonScore
|
||||
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreSeasonData const& dungeonScoreSeasonData)
|
||||
{
|
||||
data << int32(dungeonScoreSeasonData.Season);
|
||||
data << uint32(dungeonScoreSeasonData.SeasonMaps.size());
|
||||
data << uint32(dungeonScoreSeasonData.LadderMaps.size());
|
||||
data << Size<uint32>(dungeonScoreSeasonData.SeasonMaps);
|
||||
data << Size<uint32>(dungeonScoreSeasonData.LadderMaps);
|
||||
data << float(dungeonScoreSeasonData.SeasonScore);
|
||||
data << float(dungeonScoreSeasonData.LadderScore);
|
||||
for (DungeonScoreMapData const& map : dungeonScoreSeasonData.SeasonMaps)
|
||||
@@ -120,7 +118,7 @@ ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreSeasonData const& dungeonSc
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreData const& dungeonScoreData)
|
||||
{
|
||||
data << uint32(dungeonScoreData.Seasons.size());
|
||||
data << Size<uint32>(dungeonScoreData.Seasons);
|
||||
data << int32(dungeonScoreData.TotalRuns);
|
||||
for (DungeonScoreSeasonData const& season : dungeonScoreData.Seasons)
|
||||
data << season;
|
||||
@@ -128,4 +126,3 @@ ByteBuffer& operator<<(ByteBuffer& data, DungeonScoreData const& dungeonScoreDat
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MythicPlusPacketsCommon_h__
|
||||
#define MythicPlusPacketsCommon_h__
|
||||
#ifndef TRINITYCORE_MYTHIC_PLUS_PACKETS_COMMON_H
|
||||
#define TRINITYCORE_MYTHIC_PLUS_PACKETS_COMMON_H
|
||||
|
||||
#include "ObjectGuid.h"
|
||||
#include "PacketUtilities.h"
|
||||
@@ -105,4 +105,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MythicPlusPacketsCommon_h__
|
||||
#endif // TRINITYCORE_MYTHIC_PLUS_PACKETS_COMMON_H
|
||||
|
||||
@@ -31,7 +31,7 @@ ByteBuffer& operator<<(ByteBuffer& data, TreasureItem const& treasureItem)
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasureLootList const& treasureLootList)
|
||||
{
|
||||
data << uint32(treasureLootList.Items.size());
|
||||
data << Size<uint32>(treasureLootList.Items);
|
||||
for (TreasureItem const& treasureItem : treasureLootList.Items)
|
||||
data << treasureItem;
|
||||
|
||||
@@ -47,18 +47,18 @@ ByteBuffer& operator<<(ByteBuffer& data, ClientGossipOptions const& gossipOption
|
||||
data << uint32(gossipOption.OptionLanguage);
|
||||
data << int32(gossipOption.Flags);
|
||||
data << int32(gossipOption.OrderIndex);
|
||||
data << BitsSize<12>(gossipOption.Text);
|
||||
data << BitsSize<12>(gossipOption.Confirm);
|
||||
data << SizedString::BitsSize<12>(gossipOption.Text);
|
||||
data << SizedString::BitsSize<12>(gossipOption.Confirm);
|
||||
data << Bits<2>(gossipOption.Status);
|
||||
data << OptionalInit(gossipOption.SpellID);
|
||||
data << OptionalInit(gossipOption.OverrideIconID);
|
||||
data << Bits<8>(gossipOption.FailureDescription.length() + 1);
|
||||
data << SizedCString::BitsSize<8>(gossipOption.FailureDescription);
|
||||
data.FlushBits();
|
||||
|
||||
data << gossipOption.Treasure;
|
||||
|
||||
data.WriteString(gossipOption.Text);
|
||||
data.WriteString(gossipOption.Confirm);
|
||||
data << SizedString::Data(gossipOption.Text);
|
||||
data << SizedString::Data(gossipOption.Confirm);
|
||||
|
||||
if (gossipOption.SpellID)
|
||||
data << int32(*gossipOption.SpellID);
|
||||
@@ -66,8 +66,7 @@ ByteBuffer& operator<<(ByteBuffer& data, ClientGossipOptions const& gossipOption
|
||||
if (gossipOption.OverrideIconID)
|
||||
data << int32(*gossipOption.OverrideIconID);
|
||||
|
||||
if (!gossipOption.FailureDescription.empty())
|
||||
data << gossipOption.FailureDescription;
|
||||
data << SizedCString::Data(gossipOption.FailureDescription);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -84,10 +83,10 @@ ByteBuffer& operator<<(ByteBuffer& data, ClientGossipText const& gossipText)
|
||||
data << Bits<1>(gossipText.ResetByScheduler);
|
||||
data << Bits<1>(gossipText.Important);
|
||||
data << Bits<1>(gossipText.Meta);
|
||||
data << BitsSize<9>(gossipText.QuestTitle);
|
||||
data << SizedString::BitsSize<9>(gossipText.QuestTitle);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(gossipText.QuestTitle);
|
||||
data << SizedString::Data(gossipText.QuestTitle);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -101,7 +100,7 @@ WorldPacket const* NPCInteractionOpenResult::Write()
|
||||
{
|
||||
_worldPacket << Npc;
|
||||
_worldPacket << int32(InteractionType);
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket << Bits<1>(Success);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -113,8 +112,8 @@ WorldPacket const* GossipMessage::Write()
|
||||
_worldPacket << int32(GossipID);
|
||||
_worldPacket << int32(LfgDungeonsID);
|
||||
_worldPacket << int32(FriendshipFactionID);
|
||||
_worldPacket << uint32(GossipOptions.size());
|
||||
_worldPacket << uint32(GossipText.size());
|
||||
_worldPacket << Size<uint32>(GossipOptions);
|
||||
_worldPacket << Size<uint32>(GossipText);
|
||||
_worldPacket << OptionalInit(RandomTextID);
|
||||
_worldPacket << OptionalInit(BroadcastTextID);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -143,9 +142,9 @@ ByteBuffer& operator<<(ByteBuffer& data, VendorItem const& item)
|
||||
data << int32(item.Quantity);
|
||||
data << int32(item.ExtendedCostID);
|
||||
data << int32(item.PlayerConditionFailed);
|
||||
data.WriteBit(item.Locked);
|
||||
data.WriteBit(item.DoNotFilterOnVendor);
|
||||
data.WriteBit(item.Refundable);
|
||||
data << Bits<1>(item.Locked);
|
||||
data << Bits<1>(item.DoNotFilterOnVendor);
|
||||
data << Bits<1>(item.Refundable);
|
||||
data.FlushBits();
|
||||
|
||||
data << item.Item;
|
||||
@@ -157,7 +156,7 @@ WorldPacket const* VendorInventory::Write()
|
||||
{
|
||||
_worldPacket << Vendor;
|
||||
_worldPacket << int32(Reason);
|
||||
_worldPacket << uint32(Items.size());
|
||||
_worldPacket << Size<uint32>(Items);
|
||||
for (VendorItem const& item : Items)
|
||||
_worldPacket << item;
|
||||
|
||||
@@ -170,7 +169,7 @@ WorldPacket const* TrainerList::Write()
|
||||
_worldPacket << uint32(TrainerType);
|
||||
_worldPacket << uint32(TrainerID);
|
||||
|
||||
_worldPacket << uint32(Spells.size());
|
||||
_worldPacket << Size<uint32>(Spells);
|
||||
for (TrainerListSpell const& spell : Spells)
|
||||
{
|
||||
_worldPacket << int32(spell.SpellID);
|
||||
@@ -182,9 +181,10 @@ WorldPacket const* TrainerList::Write()
|
||||
_worldPacket << uint8(spell.ReqLevel);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBits(Greeting.length(), 11);
|
||||
_worldPacket << SizedString::BitsSize<11>(Greeting);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Greeting);
|
||||
|
||||
_worldPacket << SizedString::Data(Greeting);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -194,16 +194,15 @@ void GossipSelectOption::Read()
|
||||
_worldPacket >> GossipUnit;
|
||||
_worldPacket >> GossipID;
|
||||
_worldPacket >> GossipOptionID;
|
||||
|
||||
uint32 length = _worldPacket.ReadBits(8);
|
||||
PromotionCode = _worldPacket.ReadString(length);
|
||||
_worldPacket >> SizedString::BitsSize<8>(PromotionCode);
|
||||
_worldPacket >> SizedString::Data(PromotionCode);
|
||||
}
|
||||
|
||||
WorldPacket const* GossipOptionNPCInteraction::Write()
|
||||
{
|
||||
_worldPacket << GossipGUID;
|
||||
_worldPacket << int32(GossipNpcOptionID);
|
||||
_worldPacket.WriteBit(FriendshipFactionID.has_value());
|
||||
_worldPacket << OptionalInit(FriendshipFactionID);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (FriendshipFactionID)
|
||||
@@ -214,7 +213,7 @@ WorldPacket const* GossipOptionNPCInteraction::Write()
|
||||
|
||||
WorldPacket const* GossipComplete::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(SuppressSound);
|
||||
_worldPacket << Bits<1>(SuppressSound);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -228,9 +227,10 @@ WorldPacket const* GossipPOI::Write()
|
||||
_worldPacket << int32(Icon);
|
||||
_worldPacket << int32(Importance);
|
||||
_worldPacket << int32(WMOGroupID);
|
||||
_worldPacket.WriteBits(Name.length(), 6);
|
||||
_worldPacket << SizedString::BitsSize<6>(Name);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Name);
|
||||
|
||||
_worldPacket << SizedString::Data(Name);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NPCPackets_h__
|
||||
#define NPCPackets_h__
|
||||
#ifndef TRINITYCORE_NPC_PACKETS_H
|
||||
#define TRINITYCORE_NPC_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
@@ -43,7 +43,7 @@ namespace WorldPackets
|
||||
class Hello final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
Hello(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
explicit Hello(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace WorldPackets
|
||||
class TC_GAME_API NPCInteractionOpenResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
NPCInteractionOpenResult() : ServerPacket(SMSG_NPC_INTERACTION_OPEN_RESULT, 16 + 4 + 1) { }
|
||||
explicit NPCInteractionOpenResult() : ServerPacket(SMSG_NPC_INTERACTION_OPEN_RESULT, 16 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace WorldPackets
|
||||
class GossipMessage final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GossipMessage() : ServerPacket(SMSG_GOSSIP_MESSAGE, 200) { }
|
||||
explicit GossipMessage() : ServerPacket(SMSG_GOSSIP_MESSAGE, 200) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace WorldPackets
|
||||
class GossipSelectOption final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
GossipSelectOption(WorldPacket&& packet) : ClientPacket(CMSG_GOSSIP_SELECT_OPTION, std::move(packet)) { }
|
||||
explicit GossipSelectOption(WorldPacket&& packet) : ClientPacket(CMSG_GOSSIP_SELECT_OPTION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace WorldPackets
|
||||
class GossipOptionNPCInteraction final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GossipOptionNPCInteraction() : ServerPacket(SMSG_GOSSIP_OPTION_NPC_INTERACTION, 16 + 4 + 4 + 4) { }
|
||||
explicit GossipOptionNPCInteraction() : ServerPacket(SMSG_GOSSIP_OPTION_NPC_INTERACTION, 16 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace WorldPackets
|
||||
class GossipComplete final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GossipComplete() : ServerPacket(SMSG_GOSSIP_COMPLETE, 0) { }
|
||||
explicit GossipComplete() : ServerPacket(SMSG_GOSSIP_COMPLETE, 0) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace WorldPackets
|
||||
class VendorInventory final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
VendorInventory() : ServerPacket(SMSG_VENDOR_INVENTORY, 600) { }
|
||||
explicit VendorInventory() : ServerPacket(SMSG_VENDOR_INVENTORY, 600) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace WorldPackets
|
||||
class TrainerList final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TrainerList() : ServerPacket(SMSG_TRAINER_LIST, 150) { }
|
||||
explicit TrainerList() : ServerPacket(SMSG_TRAINER_LIST, 150) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace WorldPackets
|
||||
class GossipPOI final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GossipPOI() : ServerPacket(SMSG_GOSSIP_POI, 2 + 4 + 4 + 4 + 4) { }
|
||||
explicit GossipPOI() : ServerPacket(SMSG_GOSSIP_POI, 2 + 4 + 4 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace WorldPackets
|
||||
class SpiritHealerActivate final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SpiritHealerActivate(WorldPacket&& packet) : ClientPacket(CMSG_SPIRIT_HEALER_ACTIVATE, std::move(packet)) { }
|
||||
explicit SpiritHealerActivate(WorldPacket&& packet) : ClientPacket(CMSG_SPIRIT_HEALER_ACTIVATE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace WorldPackets
|
||||
class TabardVendorActivate final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
TabardVendorActivate(WorldPacket&& packet) : ClientPacket(CMSG_TABARD_VENDOR_ACTIVATE, std::move(packet)) { }
|
||||
explicit TabardVendorActivate(WorldPacket&& packet) : ClientPacket(CMSG_TABARD_VENDOR_ACTIVATE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -253,7 +253,7 @@ namespace WorldPackets
|
||||
class TrainerBuySpell final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
TrainerBuySpell(WorldPacket&& packet) : ClientPacket(CMSG_TRAINER_BUY_SPELL, std::move(packet)) { }
|
||||
explicit TrainerBuySpell(WorldPacket&& packet) : ClientPacket(CMSG_TRAINER_BUY_SPELL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace WorldPackets
|
||||
class TrainerBuyFailed final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TrainerBuyFailed() : ServerPacket(SMSG_TRAINER_BUY_FAILED, 16 + 4 + 4) { }
|
||||
explicit TrainerBuyFailed() : ServerPacket(SMSG_TRAINER_BUY_FAILED, 16 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace WorldPackets
|
||||
class RequestStabledPets final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestStabledPets(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_STABLED_PETS, std::move(packet)) { }
|
||||
explicit RequestStabledPets(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_STABLED_PETS, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace WorldPackets
|
||||
class SetPetSlot final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetPetSlot(WorldPacket&& packet) : ClientPacket(CMSG_SET_PET_SLOT, std::move(packet)) { }
|
||||
explicit SetPetSlot(WorldPacket&& packet) : ClientPacket(CMSG_SET_PET_SLOT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -298,4 +298,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NPCPackets_h__
|
||||
#endif // TRINITYCORE_NPC_PACKETS_H
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "PartyPackets.h"
|
||||
#include "Group.h"
|
||||
#include "Pet.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
@@ -23,42 +24,40 @@
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
WorldPacket const* WorldPackets::Party::PartyCommandResult::Write()
|
||||
namespace WorldPackets::Party
|
||||
{
|
||||
_worldPacket.WriteBits(Name.size(), 9);
|
||||
|
||||
_worldPacket.WriteBits(Command, 4);
|
||||
_worldPacket.WriteBits(Result, 6);
|
||||
WorldPacket const* PartyCommandResult::Write()
|
||||
{
|
||||
_worldPacket << SizedString::BitsSize<9>(Name);
|
||||
_worldPacket << Bits<4>(Command);
|
||||
_worldPacket << Bits<6>(Result);
|
||||
|
||||
_worldPacket << uint32(ResultData);
|
||||
_worldPacket << ResultGUID;
|
||||
_worldPacket.WriteString(Name);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket << SizedString::Data(Name);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::PartyInviteClient::Read()
|
||||
void PartyInviteClient::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
|
||||
_worldPacket.ResetBitPos();
|
||||
uint32 targetNameLen = _worldPacket.ReadBits(9);
|
||||
uint32 targetRealmLen = _worldPacket.ReadBits(9);
|
||||
_worldPacket >> SizedString::BitsSize<9>(TargetName);
|
||||
_worldPacket >> SizedString::BitsSize<9>(TargetRealm);
|
||||
|
||||
_worldPacket >> ProposedRoles;
|
||||
_worldPacket >> TargetGUID;
|
||||
|
||||
TargetName = _worldPacket.ReadString(targetNameLen);
|
||||
TargetRealm = _worldPacket.ReadString(targetRealmLen);
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> SizedString::Data(TargetName);
|
||||
_worldPacket >> SizedString::Data(TargetRealm);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::PartyInvite::Write()
|
||||
WorldPacket const* PartyInvite::Write()
|
||||
{
|
||||
_worldPacket << Bits<1>(CanAccept);
|
||||
_worldPacket << Bits<1>(IsXRealm);
|
||||
@@ -66,7 +65,7 @@ WorldPacket const* WorldPackets::Party::PartyInvite::Write()
|
||||
_worldPacket << Bits<1>(ShouldSquelch);
|
||||
_worldPacket << Bits<1>(AllowMultipleRoles);
|
||||
_worldPacket << Bits<1>(QuestSessionActive);
|
||||
_worldPacket << BitsSize<6>(InviterName);
|
||||
_worldPacket << SizedString::BitsSize<6>(InviterName);
|
||||
_worldPacket << Bits<1>(IsCrossFaction);
|
||||
|
||||
_worldPacket << InviterRealm;
|
||||
@@ -74,10 +73,10 @@ WorldPacket const* WorldPackets::Party::PartyInvite::Write()
|
||||
_worldPacket << InviterBNetAccountId;
|
||||
_worldPacket << uint16(InviterCfgRealmID);
|
||||
_worldPacket << uint8(ProposedRoles);
|
||||
_worldPacket << uint32(LfgSlots.size());
|
||||
_worldPacket << Size<uint32>(LfgSlots);
|
||||
_worldPacket << uint32(LfgCompletedMask);
|
||||
|
||||
_worldPacket.WriteString(InviterName);
|
||||
_worldPacket << SizedString::Data(InviterName);
|
||||
|
||||
for (uint32 LfgSlot : LfgSlots)
|
||||
_worldPacket << LfgSlot;
|
||||
@@ -85,13 +84,13 @@ WorldPacket const* WorldPackets::Party::PartyInvite::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::PartyInvite::Initialize(Player const* inviter, int32 proposedRoles, bool canAccept)
|
||||
void PartyInvite::Initialize(Player const* inviter, int32 proposedRoles, bool canAccept)
|
||||
{
|
||||
CanAccept = canAccept;
|
||||
|
||||
InviterName = inviter->GetName();
|
||||
InviterGUID = inviter->GetGUID();
|
||||
InviterBNetAccountId = inviter->GetSession()->GetAccountGUID();
|
||||
InviterBNetAccountId = inviter->m_playerData->BnetAccount;
|
||||
|
||||
ProposedRoles = proposedRoles;
|
||||
|
||||
@@ -99,56 +98,57 @@ void WorldPackets::Party::PartyInvite::Initialize(Player const* inviter, int32 p
|
||||
InviterRealm = Auth::VirtualRealmInfo(realm->Id.GetAddress(), true, false, realm->Name, realm->NormalizedName);
|
||||
}
|
||||
|
||||
void WorldPackets::Party::PartyInviteResponse::Read()
|
||||
void PartyInviteResponse::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
Accept = _worldPacket.ReadBit();
|
||||
bool hasRolesDesired = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Bits<1>(Accept);
|
||||
_worldPacket >> OptionalInit(RolesDesired);
|
||||
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
|
||||
if (hasRolesDesired)
|
||||
_worldPacket >> RolesDesired.emplace();
|
||||
if (RolesDesired)
|
||||
_worldPacket >> *RolesDesired;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::PartyUninvite::Read()
|
||||
void PartyUninvite::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
uint32 reasonLen = _worldPacket.ReadBits(8);
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> SizedString::BitsSize<8>(Reason);
|
||||
|
||||
_worldPacket >> TargetGUID;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
|
||||
Reason = _worldPacket.ReadString(reasonLen);
|
||||
_worldPacket >> SizedString::Data(Reason);
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::GroupDecline::Write()
|
||||
WorldPacket const* GroupDecline::Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Name.length(), 9);
|
||||
_worldPacket << SizedString::BitsSize<9>(Name);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Name);
|
||||
|
||||
_worldPacket << SizedString::Data(Name);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::GroupUninvite::Write()
|
||||
WorldPacket const* GroupUninvite::Write()
|
||||
{
|
||||
_worldPacket << uint8(Reason);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::RequestPartyMemberStats::Read()
|
||||
void RequestPartyMemberStats::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> TargetGUID;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberPhase const& phase)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyMemberPhase const& phase)
|
||||
{
|
||||
data << uint32(phase.Flags);
|
||||
data << uint16(phase.Id);
|
||||
@@ -156,31 +156,31 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberPhase c
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberPhaseStates const& phases)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyMemberPhaseStates const& phases)
|
||||
{
|
||||
data << uint32(phases.PhaseShiftFlags);
|
||||
data << uint32(phases.List.size());
|
||||
data << Size<uint32>(phases.List);
|
||||
data << phases.PersonalGUID;
|
||||
|
||||
for (WorldPackets::Party::PartyMemberPhase const& phase : phases.List)
|
||||
for (PartyMemberPhase const& phase : phases.List)
|
||||
data << phase;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberAuraStates const& aura)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyMemberAuraStates const& aura)
|
||||
{
|
||||
data << int32(aura.SpellID);
|
||||
data << uint16(aura.Flags);
|
||||
data << uint32(aura.ActiveFlags);
|
||||
data << int32(aura.Points.size());
|
||||
data << Size<int32>(aura.Points);
|
||||
for (float points : aura.Points)
|
||||
data << float(points);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::CTROptions const& ctrOptions)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, CTROptions const& ctrOptions)
|
||||
{
|
||||
data << uint32(ctrOptions.ConditionalFlags);
|
||||
data << int8(ctrOptions.FactionGroup);
|
||||
@@ -189,24 +189,25 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::CTROptions const&
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberPetStats const& petStats)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyMemberPetStats const& petStats)
|
||||
{
|
||||
data << petStats.GUID;
|
||||
data << int32(petStats.ModelId);
|
||||
data << int32(petStats.CurrentHealth);
|
||||
data << int32(petStats.MaxHealth);
|
||||
data << uint32(petStats.Auras.size());
|
||||
for (WorldPackets::Party::PartyMemberAuraStates const& aura : petStats.Auras)
|
||||
data << Size<uint32>(petStats.Auras);
|
||||
for (PartyMemberAuraStates const& aura : petStats.Auras)
|
||||
data << aura;
|
||||
|
||||
data.WriteBits(petStats.Name.size(), 8);
|
||||
data << SizedString::BitsSize<8>(petStats.Name);
|
||||
data.FlushBits();
|
||||
data.WriteString(petStats.Name);
|
||||
|
||||
data << SizedString::Data(petStats.Name);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberStats const& memberStats)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyMemberStats const& memberStats)
|
||||
{
|
||||
for (uint32 i = 0; i < 2; i++)
|
||||
data << uint8(memberStats.PartyType[i]);
|
||||
@@ -227,27 +228,27 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyMemberStats c
|
||||
data << int16(memberStats.PositionY);
|
||||
data << int16(memberStats.PositionZ);
|
||||
data << int32(memberStats.VehicleSeat);
|
||||
data << uint32(memberStats.Auras.size());
|
||||
data << Size<uint32>(memberStats.Auras);
|
||||
data << memberStats.Phases;
|
||||
data << memberStats.ChromieTime;
|
||||
|
||||
for (WorldPackets::Party::PartyMemberAuraStates const& aura : memberStats.Auras)
|
||||
for (PartyMemberAuraStates const& aura : memberStats.Auras)
|
||||
data << aura;
|
||||
|
||||
data.WriteBit(memberStats.PetStats.has_value());
|
||||
data << OptionalInit(memberStats.PetStats);
|
||||
data.FlushBits();
|
||||
|
||||
data << memberStats.DungeonScore;
|
||||
|
||||
if (memberStats.PetStats.has_value())
|
||||
if (memberStats.PetStats)
|
||||
data << *memberStats.PetStats;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::PartyMemberFullState::Write()
|
||||
WorldPacket const* PartyMemberFullState::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(ForEnemy);
|
||||
_worldPacket << Bits<1>(ForEnemy);
|
||||
|
||||
_worldPacket << MemberStats;
|
||||
_worldPacket << MemberGuid;
|
||||
@@ -255,34 +256,34 @@ WorldPacket const* WorldPackets::Party::PartyMemberFullState::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetPartyLeader::Read()
|
||||
void SetPartyLeader::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> TargetGUID;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetPartyAssignment::Read()
|
||||
void SetPartyAssignment::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
Set = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Bits<1>(Set);
|
||||
_worldPacket >> Assignment;
|
||||
_worldPacket >> Target;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetRole::Read()
|
||||
void SetRole::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> TargetGUID;
|
||||
_worldPacket >> Role;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::RoleChangedInform::Write()
|
||||
WorldPacket const* RoleChangedInform::Write()
|
||||
{
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
_worldPacket << From;
|
||||
@@ -293,32 +294,33 @@ WorldPacket const* WorldPackets::Party::RoleChangedInform::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::LeaveGroup::Read()
|
||||
void LeaveGroup::Read()
|
||||
{
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetLootMethod::Read()
|
||||
void SetLootMethod::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> LootMethod;
|
||||
_worldPacket >> LootMasterGUID;
|
||||
_worldPacket >> LootThreshold;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::MinimapPingClient::Read()
|
||||
void MinimapPingClient::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> PositionX;
|
||||
_worldPacket >> PositionY;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::MinimapPing::Write()
|
||||
WorldPacket const* MinimapPing::Write()
|
||||
{
|
||||
_worldPacket << Sender;
|
||||
_worldPacket << PositionX;
|
||||
@@ -327,16 +329,16 @@ WorldPacket const* WorldPackets::Party::MinimapPing::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::UpdateRaidTarget::Read()
|
||||
void UpdateRaidTarget::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Target;
|
||||
_worldPacket >> Symbol;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::SendRaidTargetUpdateSingle::Write()
|
||||
WorldPacket const* SendRaidTargetUpdateSingle::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket << Symbol;
|
||||
@@ -346,47 +348,49 @@ WorldPacket const* WorldPackets::Party::SendRaidTargetUpdateSingle::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::SendRaidTargetUpdateAll::Write()
|
||||
WorldPacket const* SendRaidTargetUpdateAll::Write()
|
||||
{
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
_worldPacket << uint32(TargetIcons.size());
|
||||
_worldPacket << Size<uint32>(TargetIcons);
|
||||
|
||||
for (auto itr = TargetIcons.begin(); itr != TargetIcons.end(); ++itr)
|
||||
for (auto& [symbol, target] : TargetIcons)
|
||||
{
|
||||
_worldPacket << itr->second;
|
||||
_worldPacket << uint8(itr->first);
|
||||
_worldPacket << target;
|
||||
_worldPacket << uint8(symbol);
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::ConvertRaid::Read()
|
||||
void ConvertRaid::Read()
|
||||
{
|
||||
Raid = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(Raid);
|
||||
}
|
||||
|
||||
void WorldPackets::Party::RequestPartyJoinUpdates::Read()
|
||||
void RequestPartyJoinUpdates::Read()
|
||||
{
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetAssistantLeader::Read()
|
||||
void SetAssistantLeader::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
Apply = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Bits<1>(Apply);
|
||||
_worldPacket >> Target;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::DoReadyCheck::Read()
|
||||
void DoReadyCheck::Read()
|
||||
{
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::ReadyCheckStarted::Write()
|
||||
WorldPacket const* ReadyCheckStarted::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket << PartyGUID;
|
||||
@@ -396,26 +400,26 @@ WorldPacket const* WorldPackets::Party::ReadyCheckStarted::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::ReadyCheckResponseClient::Read()
|
||||
void ReadyCheckResponseClient::Read()
|
||||
{
|
||||
IsReady = _worldPacket.ReadBit();
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> Bits<1>(IsReady);
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::ReadyCheckResponse::Write()
|
||||
WorldPacket const* ReadyCheckResponse::Write()
|
||||
{
|
||||
_worldPacket << PartyGUID;
|
||||
_worldPacket << Player;
|
||||
|
||||
_worldPacket.WriteBit(IsReady);
|
||||
|
||||
_worldPacket << Bits<1>(IsReady);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::ReadyCheckCompleted::Write()
|
||||
WorldPacket const* ReadyCheckCompleted::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket << PartyGUID;
|
||||
@@ -423,18 +427,19 @@ WorldPacket const* WorldPackets::Party::ReadyCheckCompleted::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::OptOutOfLoot::Read()
|
||||
void OptOutOfLoot::Read()
|
||||
{
|
||||
PassOnLoot = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(PassOnLoot);
|
||||
}
|
||||
|
||||
void WorldPackets::Party::InitiateRolePoll::Read()
|
||||
void InitiateRolePoll::Read()
|
||||
{
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::RolePollInform::Write()
|
||||
WorldPacket const* RolePollInform::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket << From;
|
||||
@@ -442,36 +447,36 @@ WorldPacket const* WorldPackets::Party::RolePollInform::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::GroupNewLeader::Write()
|
||||
WorldPacket const* GroupNewLeader::Write()
|
||||
{
|
||||
_worldPacket << PartyIndex;
|
||||
_worldPacket.WriteBits(Name.size(), 9);
|
||||
_worldPacket.WriteString(Name);
|
||||
_worldPacket << SizedString::BitsSize<9>(Name);
|
||||
|
||||
_worldPacket << SizedString::Data(Name);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyPlayerInfo const& playerInfo)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyPlayerInfo const& playerInfo)
|
||||
{
|
||||
data.WriteBits(playerInfo.Name.size(), 6);
|
||||
data.WriteBits(playerInfo.VoiceStateID.size() + 1, 6);
|
||||
data.WriteBit(playerInfo.Connected);
|
||||
data.WriteBit(playerInfo.VoiceChatSilenced);
|
||||
data.WriteBit(playerInfo.FromSocialQueue);
|
||||
data << SizedString::BitsSize<6>(playerInfo.Name);
|
||||
data << SizedCString::BitsSize<6>(playerInfo.VoiceStateID);
|
||||
data << Bits<1>(playerInfo.Connected);
|
||||
data << Bits<1>(playerInfo.VoiceChatSilenced);
|
||||
data << Bits<1>(playerInfo.FromSocialQueue);
|
||||
data << playerInfo.GUID;
|
||||
data << uint8(playerInfo.Subgroup);
|
||||
data << uint8(playerInfo.Flags);
|
||||
data << uint8(playerInfo.RolesAssigned);
|
||||
data << uint8(playerInfo.Class);
|
||||
data << uint8(playerInfo.FactionGroup);
|
||||
data.WriteString(playerInfo.Name);
|
||||
if (!playerInfo.VoiceStateID.empty())
|
||||
data << playerInfo.VoiceStateID;
|
||||
data << SizedString::Data(playerInfo.Name);
|
||||
data << SizedCString::Data(playerInfo.VoiceStateID);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyLFGInfo const& lfgInfos)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyLFGInfo const& lfgInfos)
|
||||
{
|
||||
data << uint8(lfgInfos.MyFlags);
|
||||
data << uint32(lfgInfos.Slot);
|
||||
@@ -481,14 +486,14 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyLFGInfo const
|
||||
data << uint8(lfgInfos.MyStrangerCount);
|
||||
data << uint8(lfgInfos.MyKickVoteCount);
|
||||
data << uint8(lfgInfos.BootCount);
|
||||
data.WriteBit(lfgInfos.Aborted);
|
||||
data.WriteBit(lfgInfos.MyFirstReward);
|
||||
data << Bits<1>(lfgInfos.Aborted);
|
||||
data << Bits<1>(lfgInfos.MyFirstReward);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyLootSettings const& lootSettings)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyLootSettings const& lootSettings)
|
||||
{
|
||||
data << uint8(lootSettings.Method);
|
||||
data << lootSettings.LootMaster;
|
||||
@@ -497,7 +502,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyLootSettings
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyDifficultySettings const& difficultySettings)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PartyDifficultySettings const& difficultySettings)
|
||||
{
|
||||
data << uint32(difficultySettings.DungeonDifficultyID);
|
||||
data << uint32(difficultySettings.RaidDifficultyID);
|
||||
@@ -506,7 +511,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Party::PartyDifficultySet
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::PartyUpdate::Write()
|
||||
WorldPacket const* PartyUpdate::Write()
|
||||
{
|
||||
_worldPacket << uint16(PartyFlags);
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
@@ -517,63 +522,64 @@ WorldPacket const* WorldPackets::Party::PartyUpdate::Write()
|
||||
_worldPacket << LeaderGUID;
|
||||
_worldPacket << uint8(LeaderFactionGroup);
|
||||
_worldPacket << int32(PingRestriction);
|
||||
_worldPacket << uint32(PlayerList.size());
|
||||
_worldPacket.WriteBit(LfgInfos.has_value());
|
||||
_worldPacket.WriteBit(LootSettings.has_value());
|
||||
_worldPacket.WriteBit(DifficultySettings.has_value());
|
||||
_worldPacket << Size<uint32>(PlayerList);
|
||||
_worldPacket << OptionalInit(LfgInfos);
|
||||
_worldPacket << OptionalInit(LootSettings);
|
||||
_worldPacket << OptionalInit(DifficultySettings);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (WorldPackets::Party::PartyPlayerInfo const& playerInfos : PlayerList)
|
||||
for (PartyPlayerInfo const& playerInfos : PlayerList)
|
||||
_worldPacket << playerInfos;
|
||||
|
||||
if (LootSettings.has_value())
|
||||
if (LootSettings)
|
||||
_worldPacket << *LootSettings;
|
||||
|
||||
if (DifficultySettings.has_value())
|
||||
if (DifficultySettings)
|
||||
_worldPacket << *DifficultySettings;
|
||||
|
||||
if (LfgInfos.has_value())
|
||||
if (LfgInfos)
|
||||
_worldPacket << *LfgInfos;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetEveryoneIsAssistant::Read()
|
||||
void SetEveryoneIsAssistant::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
EveryoneIsAssistant = _worldPacket.ReadBit();
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> Bits<1>(EveryoneIsAssistant);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::ChangeSubGroup::Read()
|
||||
void ChangeSubGroup::Read()
|
||||
{
|
||||
_worldPacket >> TargetGUID;
|
||||
_worldPacket >> NewSubGroup;
|
||||
if (_worldPacket.ReadBit())
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SwapSubGroups::Read()
|
||||
void SwapSubGroups::Read()
|
||||
{
|
||||
bool hasPartyIndex = _worldPacket.ReadBit();
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> FirstTarget;
|
||||
_worldPacket >> SecondTarget;
|
||||
if (hasPartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
if (PartyIndex)
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::ClearRaidMarker::Read()
|
||||
void ClearRaidMarker::Read()
|
||||
{
|
||||
_worldPacket >> MarkerId;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::RaidMarkersChanged::Write()
|
||||
WorldPacket const* RaidMarkersChanged::Write()
|
||||
{
|
||||
_worldPacket << uint8(PartyIndex);
|
||||
_worldPacket << uint32(ActiveMarkers);
|
||||
|
||||
_worldPacket.WriteBits(RaidMarkers.size(), 4);
|
||||
_worldPacket << BitsSize<4>(RaidMarkers);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (RaidMarker const* raidMarker : RaidMarkers)
|
||||
@@ -586,7 +592,7 @@ WorldPacket const* WorldPackets::Party::RaidMarkersChanged::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::PartyMemberFullState::Initialize(Player const* player)
|
||||
void PartyMemberFullState::Initialize(Player const* player)
|
||||
{
|
||||
ForEnemy = false;
|
||||
|
||||
@@ -671,10 +677,8 @@ void WorldPackets::Party::PartyMemberFullState::Initialize(Player const* player)
|
||||
PhasingHandler::FillPartyMemberPhase(&MemberStats.Phases, player->GetPhaseShift());
|
||||
|
||||
// Pet
|
||||
if (player->GetPet())
|
||||
if (::Pet* pet = player->GetPet())
|
||||
{
|
||||
::Pet* pet = player->GetPet();
|
||||
|
||||
MemberStats.PetStats.emplace();
|
||||
|
||||
MemberStats.PetStats->GUID = pet->GetGUID();
|
||||
@@ -704,7 +708,7 @@ void WorldPackets::Party::PartyMemberFullState::Initialize(Player const* player)
|
||||
MemberStats.ChromieTime.ChromieTimeExpansionMask = player->m_playerData->CtrOptions->ChromieTimeExpansionMask;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::PartyKillLog::Write()
|
||||
WorldPacket const* PartyKillLog::Write()
|
||||
{
|
||||
_worldPacket << Player;
|
||||
_worldPacket << Victim;
|
||||
@@ -712,31 +716,31 @@ WorldPacket const* WorldPackets::Party::PartyKillLog::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::BroadcastSummonCast::Write()
|
||||
WorldPacket const* BroadcastSummonCast::Write()
|
||||
{
|
||||
_worldPacket << Target;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::BroadcastSummonResponse::Write()
|
||||
WorldPacket const* BroadcastSummonResponse::Write()
|
||||
{
|
||||
_worldPacket << Target;
|
||||
_worldPacket.WriteBit(Accepted);
|
||||
_worldPacket << Bits<1>(Accepted);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SetRestrictPingsToAssistants::Read()
|
||||
void SetRestrictPingsToAssistants::Read()
|
||||
{
|
||||
_worldPacket >> OptionalInit(PartyIndex);
|
||||
_worldPacket >> As<int32>(RestrictTo);
|
||||
if (PartyIndex)
|
||||
_worldPacket >> PartyIndex.emplace();
|
||||
_worldPacket >> *PartyIndex;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SendPingUnit::Read()
|
||||
void SendPingUnit::Read()
|
||||
{
|
||||
_worldPacket >> SenderGUID;
|
||||
_worldPacket >> TargetGUID;
|
||||
@@ -752,7 +756,7 @@ void WorldPackets::Party::SendPingUnit::Read()
|
||||
_worldPacket >> *SpellOverrideNameID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::ReceivePingUnit::Write()
|
||||
WorldPacket const* ReceivePingUnit::Write()
|
||||
{
|
||||
_worldPacket << SenderGUID;
|
||||
_worldPacket << TargetGUID;
|
||||
@@ -772,7 +776,7 @@ WorldPacket const* WorldPackets::Party::ReceivePingUnit::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Party::SendPingWorldPoint::Read()
|
||||
void SendPingWorldPoint::Read()
|
||||
{
|
||||
_worldPacket >> SenderGUID;
|
||||
_worldPacket >> MapID;
|
||||
@@ -783,7 +787,7 @@ void WorldPackets::Party::SendPingWorldPoint::Read()
|
||||
_worldPacket >> PingDuration;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::ReceivePingWorldPoint::Write()
|
||||
WorldPacket const* ReceivePingWorldPoint::Write()
|
||||
{
|
||||
_worldPacket << SenderGUID;
|
||||
_worldPacket << MapID;
|
||||
@@ -796,10 +800,11 @@ WorldPacket const* WorldPackets::Party::ReceivePingWorldPoint::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Party::CancelPingPin::Write()
|
||||
WorldPacket const* CancelPingPin::Write()
|
||||
{
|
||||
_worldPacket << SenderGUID;
|
||||
_worldPacket << PinFrameID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,15 +15,20 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PartyPackets_h__
|
||||
#define PartyPackets_h__
|
||||
#ifndef TRINITYCORE_PARTY_PACKETS_H
|
||||
#define TRINITYCORE_PARTY_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "AuthenticationPackets.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Group.h"
|
||||
#include "MythicPlusPacketsCommon.h"
|
||||
#include "Optional.h"
|
||||
#include "Position.h"
|
||||
|
||||
class Player;
|
||||
struct RaidMarker;
|
||||
enum class PingSubjectType : uint8;
|
||||
enum class RestrictPingsTo : int32;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -32,7 +37,7 @@ namespace WorldPackets
|
||||
class PartyCommandResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PartyCommandResult() : ServerPacket(SMSG_PARTY_COMMAND_RESULT, 23) { }
|
||||
explicit PartyCommandResult() : ServerPacket(SMSG_PARTY_COMMAND_RESULT, 23) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -46,7 +51,7 @@ namespace WorldPackets
|
||||
class PartyInviteClient final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PartyInviteClient(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_INVITE, std::move(packet)) { }
|
||||
explicit PartyInviteClient(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_INVITE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -60,7 +65,7 @@ namespace WorldPackets
|
||||
class PartyInvite final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PartyInvite() : ServerPacket(SMSG_PARTY_INVITE, 55) { }
|
||||
explicit PartyInvite() : ServerPacket(SMSG_PARTY_INVITE, 55) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -93,7 +98,7 @@ namespace WorldPackets
|
||||
class PartyInviteResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PartyInviteResponse(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_INVITE_RESPONSE, std::move(packet)) { }
|
||||
explicit PartyInviteResponse(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_INVITE_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -105,7 +110,7 @@ namespace WorldPackets
|
||||
class PartyUninvite final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PartyUninvite(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_UNINVITE, std::move(packet)) { }
|
||||
explicit PartyUninvite(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_UNINVITE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -117,7 +122,7 @@ namespace WorldPackets
|
||||
class GroupDecline final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GroupDecline(std::string const& name) : ServerPacket(SMSG_GROUP_DECLINE, 2 + name.size()), Name(name) { }
|
||||
explicit GroupDecline(std::string const& name) : ServerPacket(SMSG_GROUP_DECLINE, 2 + name.size()), Name(name) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -127,7 +132,7 @@ namespace WorldPackets
|
||||
class GroupUninvite final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GroupUninvite() : ServerPacket(SMSG_GROUP_UNINVITE, 1) { }
|
||||
explicit GroupUninvite() : ServerPacket(SMSG_GROUP_UNINVITE, 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -137,7 +142,7 @@ namespace WorldPackets
|
||||
class RequestPartyMemberStats final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestPartyMemberStats(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_PARTY_MEMBER_STATS, std::move(packet)) { }
|
||||
explicit RequestPartyMemberStats(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_PARTY_MEMBER_STATS, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -222,7 +227,7 @@ namespace WorldPackets
|
||||
class PartyMemberFullState final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PartyMemberFullState() : ServerPacket(SMSG_PARTY_MEMBER_FULL_STATE, 80) { }
|
||||
explicit PartyMemberFullState() : ServerPacket(SMSG_PARTY_MEMBER_FULL_STATE, 80) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
void Initialize(Player const* player);
|
||||
@@ -235,7 +240,7 @@ namespace WorldPackets
|
||||
class SetPartyLeader final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetPartyLeader(WorldPacket&& packet) : ClientPacket(CMSG_SET_PARTY_LEADER, std::move(packet)) { }
|
||||
explicit SetPartyLeader(WorldPacket&& packet) : ClientPacket(CMSG_SET_PARTY_LEADER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -246,7 +251,7 @@ namespace WorldPackets
|
||||
class SetRole final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetRole(WorldPacket&& packet) : ClientPacket(CMSG_SET_ROLE, std::move(packet)) { }
|
||||
explicit SetRole(WorldPacket&& packet) : ClientPacket(CMSG_SET_ROLE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -258,7 +263,7 @@ namespace WorldPackets
|
||||
class RoleChangedInform final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RoleChangedInform() : ServerPacket(SMSG_ROLE_CHANGED_INFORM, 41) { }
|
||||
explicit RoleChangedInform() : ServerPacket(SMSG_ROLE_CHANGED_INFORM, 41) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -272,7 +277,7 @@ namespace WorldPackets
|
||||
class LeaveGroup final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
LeaveGroup(WorldPacket&& packet) : ClientPacket(CMSG_LEAVE_GROUP, std::move(packet)) { }
|
||||
explicit LeaveGroup(WorldPacket&& packet) : ClientPacket(CMSG_LEAVE_GROUP, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -282,7 +287,7 @@ namespace WorldPackets
|
||||
class SetLootMethod final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetLootMethod(WorldPacket&& packet) : ClientPacket(CMSG_SET_LOOT_METHOD, std::move(packet)) { }
|
||||
explicit SetLootMethod(WorldPacket&& packet) : ClientPacket(CMSG_SET_LOOT_METHOD, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -295,7 +300,7 @@ namespace WorldPackets
|
||||
class MinimapPingClient final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
MinimapPingClient(WorldPacket&& packet) : ClientPacket(CMSG_MINIMAP_PING, std::move(packet)) { }
|
||||
explicit MinimapPingClient(WorldPacket&& packet) : ClientPacket(CMSG_MINIMAP_PING, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -307,7 +312,7 @@ namespace WorldPackets
|
||||
class MinimapPing final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
MinimapPing() : ServerPacket(SMSG_MINIMAP_PING, 24) { }
|
||||
explicit MinimapPing() : ServerPacket(SMSG_MINIMAP_PING, 24) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -319,7 +324,7 @@ namespace WorldPackets
|
||||
class UpdateRaidTarget final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
UpdateRaidTarget(WorldPacket&& packet) : ClientPacket(CMSG_UPDATE_RAID_TARGET, std::move(packet)) { }
|
||||
explicit UpdateRaidTarget(WorldPacket&& packet) : ClientPacket(CMSG_UPDATE_RAID_TARGET, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -331,7 +336,7 @@ namespace WorldPackets
|
||||
class SendRaidTargetUpdateSingle final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SendRaidTargetUpdateSingle() : ServerPacket(SMSG_SEND_RAID_TARGET_UPDATE_SINGLE, 34) { }
|
||||
explicit SendRaidTargetUpdateSingle() : ServerPacket(SMSG_SEND_RAID_TARGET_UPDATE_SINGLE, 34) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -344,18 +349,18 @@ namespace WorldPackets
|
||||
class SendRaidTargetUpdateAll final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SendRaidTargetUpdateAll() : ServerPacket(SMSG_SEND_RAID_TARGET_UPDATE_ALL, 1 + TARGET_ICONS_COUNT * (1 + 16)) { }
|
||||
explicit SendRaidTargetUpdateAll() : ServerPacket(SMSG_SEND_RAID_TARGET_UPDATE_ALL, 1 + 8 * (1 + 16)) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint8 PartyIndex = 0;
|
||||
std::map<uint8, ObjectGuid> TargetIcons;
|
||||
std::vector<std::pair<uint8, ObjectGuid>> TargetIcons;
|
||||
};
|
||||
|
||||
class ConvertRaid final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ConvertRaid(WorldPacket&& packet) : ClientPacket(CMSG_CONVERT_RAID, std::move(packet)) { }
|
||||
explicit ConvertRaid(WorldPacket&& packet) : ClientPacket(CMSG_CONVERT_RAID, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -365,7 +370,7 @@ namespace WorldPackets
|
||||
class RequestPartyJoinUpdates final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestPartyJoinUpdates(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_PARTY_JOIN_UPDATES, std::move(packet)) { }
|
||||
explicit RequestPartyJoinUpdates(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_PARTY_JOIN_UPDATES, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -375,7 +380,7 @@ namespace WorldPackets
|
||||
class SetAssistantLeader final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetAssistantLeader(WorldPacket&& packet) : ClientPacket(CMSG_SET_ASSISTANT_LEADER, std::move(packet)) { }
|
||||
explicit SetAssistantLeader(WorldPacket&& packet) : ClientPacket(CMSG_SET_ASSISTANT_LEADER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -387,7 +392,7 @@ namespace WorldPackets
|
||||
class SetPartyAssignment final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetPartyAssignment(WorldPacket&& packet) : ClientPacket(CMSG_SET_PARTY_ASSIGNMENT, std::move(packet)) { }
|
||||
explicit SetPartyAssignment(WorldPacket&& packet) : ClientPacket(CMSG_SET_PARTY_ASSIGNMENT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
uint8 Assignment = 0;
|
||||
@@ -399,7 +404,7 @@ namespace WorldPackets
|
||||
class DoReadyCheck final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DoReadyCheck(WorldPacket&& packet) : ClientPacket(CMSG_DO_READY_CHECK, std::move(packet)) { }
|
||||
explicit DoReadyCheck(WorldPacket&& packet) : ClientPacket(CMSG_DO_READY_CHECK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -409,7 +414,7 @@ namespace WorldPackets
|
||||
class ReadyCheckStarted final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ReadyCheckStarted() : ServerPacket(SMSG_READY_CHECK_STARTED, 37) { }
|
||||
explicit ReadyCheckStarted() : ServerPacket(SMSG_READY_CHECK_STARTED, 37) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -422,7 +427,7 @@ namespace WorldPackets
|
||||
class ReadyCheckResponseClient final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ReadyCheckResponseClient(WorldPacket&& packet) : ClientPacket(CMSG_READY_CHECK_RESPONSE, std::move(packet)) { }
|
||||
explicit ReadyCheckResponseClient(WorldPacket&& packet) : ClientPacket(CMSG_READY_CHECK_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -433,7 +438,7 @@ namespace WorldPackets
|
||||
class ReadyCheckResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ReadyCheckResponse() : ServerPacket(SMSG_READY_CHECK_RESPONSE, 19) { }
|
||||
explicit ReadyCheckResponse() : ServerPacket(SMSG_READY_CHECK_RESPONSE, 19) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -445,7 +450,7 @@ namespace WorldPackets
|
||||
class ReadyCheckCompleted final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ReadyCheckCompleted() : ServerPacket(SMSG_READY_CHECK_COMPLETED, 17) { }
|
||||
explicit ReadyCheckCompleted() : ServerPacket(SMSG_READY_CHECK_COMPLETED, 17) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -456,7 +461,7 @@ namespace WorldPackets
|
||||
class RequestRaidInfo final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestRaidInfo(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_RAID_INFO, std::move(packet)) { }
|
||||
explicit RequestRaidInfo(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_RAID_INFO, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -464,7 +469,7 @@ namespace WorldPackets
|
||||
class OptOutOfLoot final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
OptOutOfLoot(WorldPacket&& packet) : ClientPacket(CMSG_OPT_OUT_OF_LOOT, std::move(packet)) { }
|
||||
explicit OptOutOfLoot(WorldPacket&& packet) : ClientPacket(CMSG_OPT_OUT_OF_LOOT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -474,7 +479,7 @@ namespace WorldPackets
|
||||
class InitiateRolePoll final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
InitiateRolePoll(WorldPacket&& packet) : ClientPacket(CMSG_INITIATE_ROLE_POLL, std::move(packet)) { }
|
||||
explicit InitiateRolePoll(WorldPacket&& packet) : ClientPacket(CMSG_INITIATE_ROLE_POLL, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -484,7 +489,7 @@ namespace WorldPackets
|
||||
class RolePollInform final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RolePollInform() : ServerPacket(SMSG_ROLE_POLL_INFORM, 17) { }
|
||||
explicit RolePollInform() : ServerPacket(SMSG_ROLE_POLL_INFORM, 17) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -495,7 +500,7 @@ namespace WorldPackets
|
||||
class GroupNewLeader final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GroupNewLeader() : ServerPacket(SMSG_GROUP_NEW_LEADER, 14) { }
|
||||
explicit GroupNewLeader() : ServerPacket(SMSG_GROUP_NEW_LEADER, 14) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -549,7 +554,7 @@ namespace WorldPackets
|
||||
class PartyUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PartyUpdate() : ServerPacket(SMSG_PARTY_UPDATE, 200) { }
|
||||
explicit PartyUpdate() : ServerPacket(SMSG_PARTY_UPDATE, 200) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -564,7 +569,7 @@ namespace WorldPackets
|
||||
int32 MyIndex = 0;
|
||||
int32 SequenceNum = 0;
|
||||
|
||||
RestrictPingsTo PingRestriction = RestrictPingsTo::None;
|
||||
RestrictPingsTo PingRestriction = { };
|
||||
|
||||
std::vector<PartyPlayerInfo> PlayerList;
|
||||
|
||||
@@ -576,7 +581,7 @@ namespace WorldPackets
|
||||
class SetEveryoneIsAssistant final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SetEveryoneIsAssistant(WorldPacket&& packet) : ClientPacket(CMSG_SET_EVERYONE_IS_ASSISTANT, std::move(packet)) { }
|
||||
explicit SetEveryoneIsAssistant(WorldPacket&& packet) : ClientPacket(CMSG_SET_EVERYONE_IS_ASSISTANT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -587,7 +592,7 @@ namespace WorldPackets
|
||||
class ChangeSubGroup final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ChangeSubGroup(WorldPacket&& packet) : ClientPacket(CMSG_CHANGE_SUB_GROUP, std::move(packet)) { }
|
||||
explicit ChangeSubGroup(WorldPacket&& packet) : ClientPacket(CMSG_CHANGE_SUB_GROUP, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -599,7 +604,7 @@ namespace WorldPackets
|
||||
class SwapSubGroups final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SwapSubGroups(WorldPacket&& packet) : ClientPacket(CMSG_SWAP_SUB_GROUPS, std::move(packet)) { }
|
||||
explicit SwapSubGroups(WorldPacket&& packet) : ClientPacket(CMSG_SWAP_SUB_GROUPS, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -611,7 +616,7 @@ namespace WorldPackets
|
||||
class ClearRaidMarker final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ClearRaidMarker(WorldPacket&& packet) : ClientPacket(CMSG_CLEAR_RAID_MARKER, std::move(packet)) { }
|
||||
explicit ClearRaidMarker(WorldPacket&& packet) : ClientPacket(CMSG_CLEAR_RAID_MARKER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -621,7 +626,7 @@ namespace WorldPackets
|
||||
class RaidMarkersChanged final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RaidMarkersChanged() : ServerPacket(SMSG_RAID_MARKERS_CHANGED, 6) { }
|
||||
explicit RaidMarkersChanged() : ServerPacket(SMSG_RAID_MARKERS_CHANGED, 6) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -634,7 +639,7 @@ namespace WorldPackets
|
||||
class PartyKillLog final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PartyKillLog() : ServerPacket(SMSG_PARTY_KILL_LOG, 2 * 16) { }
|
||||
explicit PartyKillLog() : ServerPacket(SMSG_PARTY_KILL_LOG, 2 * 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -645,7 +650,7 @@ namespace WorldPackets
|
||||
class GroupDestroyed final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GroupDestroyed() : ServerPacket(SMSG_GROUP_DESTROYED, 0) { }
|
||||
explicit GroupDestroyed() : ServerPacket(SMSG_GROUP_DESTROYED, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
@@ -653,7 +658,7 @@ namespace WorldPackets
|
||||
class BroadcastSummonCast final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
BroadcastSummonCast() : ServerPacket(SMSG_BROADCAST_SUMMON_CAST, 16) { }
|
||||
explicit BroadcastSummonCast() : ServerPacket(SMSG_BROADCAST_SUMMON_CAST, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -663,7 +668,7 @@ namespace WorldPackets
|
||||
class BroadcastSummonResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
BroadcastSummonResponse() : ServerPacket(SMSG_BROADCAST_SUMMON_RESPONSE, 16 + 1) { }
|
||||
explicit BroadcastSummonResponse() : ServerPacket(SMSG_BROADCAST_SUMMON_RESPONSE, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -679,7 +684,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
Optional<uint8> PartyIndex;
|
||||
RestrictPingsTo RestrictTo = RestrictPingsTo::None;
|
||||
RestrictPingsTo RestrictTo = { };
|
||||
};
|
||||
|
||||
class SendPingUnit final : public ClientPacket
|
||||
@@ -691,7 +696,7 @@ namespace WorldPackets
|
||||
|
||||
ObjectGuid SenderGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
PingSubjectType Type = PingSubjectType::Max;
|
||||
PingSubjectType Type = { };
|
||||
uint32 PinFrameID = 0;
|
||||
Duration<Milliseconds, int32> PingDuration;
|
||||
Optional<uint32> CreatureID;
|
||||
@@ -701,13 +706,13 @@ namespace WorldPackets
|
||||
class ReceivePingUnit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ReceivePingUnit() : ServerPacket(SMSG_RECEIVE_PING_UNIT, 16 + 16 + 1 + 4) { }
|
||||
explicit ReceivePingUnit() : ServerPacket(SMSG_RECEIVE_PING_UNIT, 16 + 16 + 1 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid SenderGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
PingSubjectType Type = PingSubjectType::Max;
|
||||
PingSubjectType Type = { };
|
||||
uint32 PinFrameID = 0;
|
||||
Duration<Milliseconds, int32> PingDuration;
|
||||
Optional<uint32> CreatureID;
|
||||
@@ -724,7 +729,7 @@ namespace WorldPackets
|
||||
ObjectGuid SenderGUID;
|
||||
uint32 MapID = 0;
|
||||
TaggedPosition<Position::XYZ> Point;
|
||||
PingSubjectType Type = PingSubjectType::Max;
|
||||
PingSubjectType Type = { };
|
||||
uint32 PinFrameID = 0;
|
||||
ObjectGuid Transport;
|
||||
Duration<Milliseconds, int32> PingDuration;
|
||||
@@ -733,14 +738,14 @@ namespace WorldPackets
|
||||
class ReceivePingWorldPoint final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ReceivePingWorldPoint() : ServerPacket(SMSG_RECEIVE_PING_WORLD_POINT, 16 + 4 + 4 * 3 + 1 + 4) { }
|
||||
explicit ReceivePingWorldPoint() : ServerPacket(SMSG_RECEIVE_PING_WORLD_POINT, 16 + 4 + 4 * 3 + 1 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid SenderGUID;
|
||||
uint32 MapID = 0;
|
||||
TaggedPosition<Position::XYZ> Point;
|
||||
PingSubjectType Type = PingSubjectType::Max;
|
||||
PingSubjectType Type = { };
|
||||
uint32 PinFrameID = 0;
|
||||
Duration<Milliseconds, int32> PingDuration;
|
||||
ObjectGuid Transport;
|
||||
@@ -749,7 +754,7 @@ namespace WorldPackets
|
||||
class CancelPingPin final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CancelPingPin() : ServerPacket(SMSG_CANCEL_PING_PIN, 16 + 4) { }
|
||||
explicit CancelPingPin() : ServerPacket(SMSG_CANCEL_PING_PIN, 16 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -759,4 +764,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PartyPackets_h__
|
||||
#endif // TRINITYCORE_PARTY_PACKETS_H
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PerksPorgramPacketsCommon_h__
|
||||
#define PerksPorgramPacketsCommon_h__
|
||||
#ifndef TRINITYCORE_PERKS_PROGRAM_PACKETS_COMMON_H
|
||||
#define TRINITYCORE_PERKS_PROGRAM_PACKETS_COMMON_H
|
||||
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
@@ -42,4 +42,4 @@ struct PerksVendorItem
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PerksVendorItem const& perksVendorItem);
|
||||
}
|
||||
|
||||
#endif // PerksPorgramPacketsCommon_h__
|
||||
#endif // TRINITYCORE_PERKS_PROGRAM_PACKETS_COMMON_H
|
||||
|
||||
@@ -16,8 +16,11 @@
|
||||
*/
|
||||
|
||||
#include "PetPackets.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetSpells::Write()
|
||||
namespace WorldPackets::Pet
|
||||
{
|
||||
WorldPacket const* PetSpells::Write()
|
||||
{
|
||||
_worldPacket << PetGUID;
|
||||
_worldPacket << uint16(_CreatureFamily);
|
||||
@@ -27,9 +30,9 @@ WorldPacket const* WorldPackets::Pet::PetSpells::Write()
|
||||
_worldPacket << uint8(Flag);
|
||||
_worldPacket << uint8(ReactState);
|
||||
_worldPacket.append(ActionButtons.data(), ActionButtons.size());
|
||||
_worldPacket << uint32(Actions.size());
|
||||
_worldPacket << uint32(Cooldowns.size());
|
||||
_worldPacket << uint32(SpellHistory.size());
|
||||
_worldPacket << Size<uint32>(Actions);
|
||||
_worldPacket << Size<uint32>(Cooldowns);
|
||||
_worldPacket << Size<uint32>(SpellHistory);
|
||||
|
||||
for (uint32 action : Actions)
|
||||
_worldPacket << uint32(action);
|
||||
@@ -54,74 +57,79 @@ WorldPacket const* WorldPackets::Pet::PetSpells::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetStableResult::Write()
|
||||
WorldPacket const* PetStableResult::Write()
|
||||
{
|
||||
_worldPacket << int32(Result);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetLearnedSpells::Write()
|
||||
WorldPacket const* PetLearnedSpells::Write()
|
||||
{
|
||||
_worldPacket << uint32(Spells.size());
|
||||
_worldPacket << Size<uint32>(Spells);
|
||||
for (uint32 spell : Spells)
|
||||
_worldPacket << int32(spell);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetUnlearnedSpells::Write()
|
||||
WorldPacket const* PetUnlearnedSpells::Write()
|
||||
{
|
||||
_worldPacket << uint32(Spells.size());
|
||||
_worldPacket << Size<uint32>(Spells);
|
||||
for (uint32 spell : Spells)
|
||||
_worldPacket << int32(spell);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetNameInvalid::Write()
|
||||
WorldPacket const* PetNameInvalid::Write()
|
||||
{
|
||||
_worldPacket << uint8(Result);
|
||||
_worldPacket << RenameData.PetGUID;
|
||||
_worldPacket << int32(RenameData.PetNumber);
|
||||
|
||||
_worldPacket << uint8(RenameData.NewName.length());
|
||||
|
||||
_worldPacket.WriteBit(RenameData.DeclinedNames.has_value());
|
||||
_worldPacket << SizedString::BitsSize<8>(RenameData.NewName);
|
||||
_worldPacket << OptionalInit(RenameData.DeclinedNames);
|
||||
|
||||
if (RenameData.DeclinedNames)
|
||||
{
|
||||
for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
|
||||
_worldPacket.WriteBits(RenameData.DeclinedNames->name[i].length(), 7);
|
||||
_worldPacket << SizedString::BitsSize<7>(RenameData.DeclinedNames->name[i]);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
|
||||
_worldPacket << RenameData.DeclinedNames->name[i];
|
||||
_worldPacket << SizedString::Data(RenameData.DeclinedNames->name[i]);
|
||||
}
|
||||
else
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << SizedString::Data(RenameData.NewName);
|
||||
|
||||
_worldPacket.WriteString(RenameData.NewName);
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetRename::Read()
|
||||
void PetRename::Read()
|
||||
{
|
||||
_worldPacket >> RenameData.PetGUID;
|
||||
_worldPacket >> RenameData.PetNumber;
|
||||
|
||||
uint8 nameLen = _worldPacket.ReadBits(8);
|
||||
_worldPacket >> SizedString::BitsSize<8>(RenameData.NewName);
|
||||
_worldPacket >> OptionalInit(RenameData.DeclinedNames);
|
||||
|
||||
if (_worldPacket.ReadBit())
|
||||
if (RenameData.DeclinedNames)
|
||||
{
|
||||
RenameData.DeclinedNames.emplace();
|
||||
int32 count[MAX_DECLINED_NAME_CASES];
|
||||
for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
|
||||
count[i] = _worldPacket.ReadBits(7);
|
||||
_worldPacket >> SizedString::BitsSize<7>(RenameData.DeclinedNames->name[i]);
|
||||
|
||||
for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
|
||||
RenameData.DeclinedNames->name[i] = _worldPacket.ReadString(count[i]);
|
||||
_worldPacket >> SizedString::Data(RenameData.DeclinedNames->name[i]);
|
||||
}
|
||||
|
||||
RenameData.NewName = _worldPacket.ReadString(nameLen);
|
||||
_worldPacket >> SizedString::Data(RenameData.NewName);
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetAction::Read()
|
||||
void PetAction::Read()
|
||||
{
|
||||
_worldPacket >> PetGUID;
|
||||
|
||||
@@ -131,12 +139,12 @@ void WorldPackets::Pet::PetAction::Read()
|
||||
_worldPacket >> ActionPosition;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetStopAttack::Read()
|
||||
void PetStopAttack::Read()
|
||||
{
|
||||
_worldPacket >> PetGUID;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetSetAction::Read()
|
||||
void PetSetAction::Read()
|
||||
{
|
||||
_worldPacket >> PetGUID;
|
||||
|
||||
@@ -144,42 +152,42 @@ void WorldPackets::Pet::PetSetAction::Read()
|
||||
_worldPacket >> Action;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetAbandon::Read()
|
||||
void PetAbandon::Read()
|
||||
{
|
||||
_worldPacket >> Pet;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetAbandonByNumber::Read()
|
||||
void PetAbandonByNumber::Read()
|
||||
{
|
||||
_worldPacket >> PetNumber;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetSpellAutocast::Read()
|
||||
void PetSpellAutocast::Read()
|
||||
{
|
||||
_worldPacket >> PetGUID;
|
||||
_worldPacket >> SpellID;
|
||||
AutocastEnabled = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(AutocastEnabled);
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::DismissCritter::Read()
|
||||
void DismissCritter::Read()
|
||||
{
|
||||
_worldPacket >> CritterGUID;
|
||||
}
|
||||
|
||||
void WorldPackets::Pet::PetCancelAura::Read()
|
||||
void PetCancelAura::Read()
|
||||
{
|
||||
_worldPacket >> PetGUID;
|
||||
_worldPacket >> SpellID;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::SetPetSpecialization::Write()
|
||||
WorldPacket const* SetPetSpecialization::Write()
|
||||
{
|
||||
_worldPacket << uint16(SpecID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetActionFeedback::Write()
|
||||
WorldPacket const* PetActionFeedback::Write()
|
||||
{
|
||||
_worldPacket << int32(SpellID);
|
||||
_worldPacket << uint8(Response);
|
||||
@@ -187,7 +195,7 @@ WorldPacket const* WorldPackets::Pet::PetActionFeedback::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetActionSound::Write()
|
||||
WorldPacket const* PetActionSound::Write()
|
||||
{
|
||||
_worldPacket << UnitGUID;
|
||||
_worldPacket << int32(Action);
|
||||
@@ -195,14 +203,14 @@ WorldPacket const* WorldPackets::Pet::PetActionSound::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetTameFailure::Write()
|
||||
WorldPacket const* PetTameFailure::Write()
|
||||
{
|
||||
_worldPacket << uint8(Result);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Pet::PetMode::Write()
|
||||
WorldPacket const* PetMode::Write()
|
||||
{
|
||||
_worldPacket << PetGUID;
|
||||
_worldPacket << uint8(CommandState);
|
||||
@@ -211,3 +219,4 @@ WorldPacket const* WorldPackets::Pet::PetMode::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PetPackets_h__
|
||||
#define PetPackets_h__
|
||||
#ifndef TRINITYCORE_PET_PACKETS_H
|
||||
#define TRINITYCORE_PET_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "PetDefines.h"
|
||||
@@ -33,7 +33,7 @@ namespace WorldPackets
|
||||
class DismissCritter final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DismissCritter(WorldPacket&& packet) : ClientPacket(CMSG_DISMISS_CRITTER, std::move(packet)) { }
|
||||
explicit DismissCritter(WorldPacket&& packet) : ClientPacket(CMSG_DISMISS_CRITTER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace WorldPackets
|
||||
class RequestPetInfo final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestPetInfo(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_PET_INFO, std::move(packet)) { }
|
||||
explicit RequestPetInfo(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_PET_INFO, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -51,7 +51,7 @@ namespace WorldPackets
|
||||
class PetAbandon final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetAbandon(WorldPacket&& packet) : ClientPacket(CMSG_PET_ABANDON, std::move(packet)) { }
|
||||
explicit PetAbandon(WorldPacket&& packet) : ClientPacket(CMSG_PET_ABANDON, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace WorldPackets
|
||||
class PetAbandonByNumber final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetAbandonByNumber(WorldPacket&& packet) : ClientPacket(CMSG_PET_ABANDON_BY_NUMBER, std::move(packet)) { }
|
||||
explicit PetAbandonByNumber(WorldPacket&& packet) : ClientPacket(CMSG_PET_ABANDON_BY_NUMBER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace WorldPackets
|
||||
class PetStopAttack final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetStopAttack(WorldPacket&& packet) : ClientPacket(CMSG_PET_STOP_ATTACK, std::move(packet)) { }
|
||||
explicit PetStopAttack(WorldPacket&& packet) : ClientPacket(CMSG_PET_STOP_ATTACK, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace WorldPackets
|
||||
class PetSpellAutocast final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetSpellAutocast(WorldPacket&& packet) : ClientPacket(CMSG_PET_SPELL_AUTOCAST, std::move(packet)) { }
|
||||
explicit PetSpellAutocast(WorldPacket&& packet) : ClientPacket(CMSG_PET_SPELL_AUTOCAST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace WorldPackets
|
||||
class PetSpells final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetSpells() : ServerPacket(SMSG_PET_SPELLS_MESSAGE, 100) { }
|
||||
explicit PetSpells() : ServerPacket(SMSG_PET_SPELLS_MESSAGE, 100) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace WorldPackets
|
||||
class PetStableResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetStableResult() : ServerPacket(SMSG_PET_STABLE_RESULT, 1) { }
|
||||
explicit PetStableResult() : ServerPacket(SMSG_PET_STABLE_RESULT, 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace WorldPackets
|
||||
class PetLearnedSpells final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetLearnedSpells() : ServerPacket(SMSG_PET_LEARNED_SPELLS, 4) { }
|
||||
explicit PetLearnedSpells() : ServerPacket(SMSG_PET_LEARNED_SPELLS, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace WorldPackets
|
||||
class PetUnlearnedSpells final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetUnlearnedSpells() : ServerPacket(SMSG_PET_UNLEARNED_SPELLS, 4) { }
|
||||
explicit PetUnlearnedSpells() : ServerPacket(SMSG_PET_UNLEARNED_SPELLS, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace WorldPackets
|
||||
class PetNameInvalid final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetNameInvalid() : ServerPacket(SMSG_PET_NAME_INVALID, 18 + 4 + 2 + 1 + 5 * 2 + 2) { }
|
||||
explicit PetNameInvalid() : ServerPacket(SMSG_PET_NAME_INVALID, 18 + 4 + 2 + 1 + 5 * 2 + 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace WorldPackets
|
||||
class PetRename final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetRename(WorldPacket&& packet) : ClientPacket(CMSG_PET_RENAME, std::move(packet)) { }
|
||||
explicit PetRename(WorldPacket&& packet) : ClientPacket(CMSG_PET_RENAME, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace WorldPackets
|
||||
class PetAction final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetAction(WorldPacket&& packet) : ClientPacket(CMSG_PET_ACTION, std::move(packet)) { }
|
||||
explicit PetAction(WorldPacket&& packet) : ClientPacket(CMSG_PET_ACTION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace WorldPackets
|
||||
class PetSetAction final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetSetAction(WorldPacket&& packet) : ClientPacket(CMSG_PET_SET_ACTION, std::move(packet)) { }
|
||||
explicit PetSetAction(WorldPacket&& packet) : ClientPacket(CMSG_PET_SET_ACTION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace WorldPackets
|
||||
class PetCancelAura final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetCancelAura(WorldPacket&& packet) : ClientPacket(CMSG_PET_CANCEL_AURA, std::move(packet)) { }
|
||||
explicit PetCancelAura(WorldPacket&& packet) : ClientPacket(CMSG_PET_CANCEL_AURA, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace WorldPackets
|
||||
class SetPetSpecialization final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
SetPetSpecialization() : ServerPacket(SMSG_SET_PET_SPECIALIZATION, 2) { }
|
||||
explicit SetPetSpecialization() : ServerPacket(SMSG_SET_PET_SPECIALIZATION, 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace WorldPackets
|
||||
class PetActionFeedback final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetActionFeedback() : ServerPacket(SMSG_PET_ACTION_FEEDBACK, 4 + 1) { }
|
||||
explicit PetActionFeedback() : ServerPacket(SMSG_PET_ACTION_FEEDBACK, 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace WorldPackets
|
||||
class PetActionSound final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetActionSound() : ServerPacket(SMSG_PET_ACTION_SOUND, 18 + 4) { }
|
||||
explicit PetActionSound() : ServerPacket(SMSG_PET_ACTION_SOUND, 18 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace WorldPackets
|
||||
class PetTameFailure final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetTameFailure() : ServerPacket(SMSG_PET_TAME_FAILURE, 1) { }
|
||||
explicit PetTameFailure() : ServerPacket(SMSG_PET_TAME_FAILURE, 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace WorldPackets
|
||||
class PetMode final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetMode() : ServerPacket(SMSG_PET_MODE, 16 + 2 + 1) { }
|
||||
explicit PetMode() : ServerPacket(SMSG_PET_MODE, 16 + 2 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -283,4 +283,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PetPackets_h__
|
||||
#endif // TRINITYCORE_PET_PACKETS_H
|
||||
|
||||
@@ -64,7 +64,7 @@ ByteBuffer& operator<<(ByteBuffer& data, PetitionInfo const& petitionInfo)
|
||||
WorldPacket const* QueryPetitionResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(PetitionID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket << Bits<1>(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (Allow)
|
||||
@@ -88,11 +88,11 @@ WorldPacket const* ServerPetitionShowList::Write()
|
||||
|
||||
void PetitionBuy::Read()
|
||||
{
|
||||
uint32 titleLen = _worldPacket.ReadBits(7);
|
||||
_worldPacket >> SizedString::BitsSize<7>(Title);
|
||||
|
||||
_worldPacket >> Unit;
|
||||
_worldPacket >> Muid;
|
||||
Title = _worldPacket.ReadString(titleLen);
|
||||
_worldPacket >> SizedString::Data(Title);
|
||||
}
|
||||
|
||||
void PetitionShowSignatures::Read()
|
||||
@@ -107,7 +107,7 @@ WorldPacket const* ServerPetitionShowSignatures::Write()
|
||||
_worldPacket << OwnerAccountID;
|
||||
_worldPacket << int32(PetitionID);
|
||||
|
||||
_worldPacket << uint32(Signatures.size());
|
||||
_worldPacket << Size<uint32>(Signatures);
|
||||
for (PetitionSignature const& signature : Signatures)
|
||||
{
|
||||
_worldPacket << signature.Signer;
|
||||
@@ -128,7 +128,7 @@ WorldPacket const* PetitionSignResults::Write()
|
||||
_worldPacket << Item;
|
||||
_worldPacket << Player;
|
||||
|
||||
_worldPacket.WriteBits(Error, 4);
|
||||
_worldPacket << Bits<4>(Error);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -153,7 +153,7 @@ void TurnInPetition::Read()
|
||||
|
||||
WorldPacket const* TurnInPetitionResult::Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Result, 4);
|
||||
_worldPacket << Bits<4>(Result);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -175,21 +175,18 @@ WorldPacket const* OfferPetitionError::Write()
|
||||
void PetitionRenameGuild::Read()
|
||||
{
|
||||
_worldPacket >> PetitionGuid;
|
||||
_worldPacket >> SizedString::BitsSize<7>(NewGuildName);
|
||||
|
||||
_worldPacket.ResetBitPos();
|
||||
uint32 nameLen = _worldPacket.ReadBits(7);
|
||||
|
||||
NewGuildName = _worldPacket.ReadString(nameLen);
|
||||
_worldPacket >> SizedString::Data(NewGuildName);
|
||||
}
|
||||
|
||||
WorldPacket const* PetitionRenameGuildResponse::Write()
|
||||
{
|
||||
_worldPacket << PetitionGuid;
|
||||
|
||||
_worldPacket.WriteBits(NewGuildName.length(), 7);
|
||||
_worldPacket << SizedString::BitsSize<7>(NewGuildName);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(NewGuildName);
|
||||
_worldPacket << SizedString::Data(NewGuildName);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PetitionPackets_h__
|
||||
#define PetitionPackets_h__
|
||||
#ifndef TRINITYCORE_PETITION_PACKETS_H
|
||||
#define TRINITYCORE_PETITION_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ObjectGuid.h"
|
||||
@@ -28,7 +28,7 @@ namespace WorldPackets
|
||||
class QueryPetition final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryPetition(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PETITION, std::move(packet)) { }
|
||||
explicit QueryPetition(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PETITION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace WorldPackets
|
||||
class QueryPetitionResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryPetitionResponse() : ServerPacket(SMSG_QUERY_PETITION_RESPONSE, 75) { }
|
||||
explicit QueryPetitionResponse() : ServerPacket(SMSG_QUERY_PETITION_RESPONSE, 75) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace WorldPackets
|
||||
class PetitionShowList final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetitionShowList(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_SHOW_LIST, std::move(packet)) { }
|
||||
explicit PetitionShowList(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_SHOW_LIST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace WorldPackets
|
||||
class ServerPetitionShowList final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ServerPetitionShowList() : ServerPacket(SMSG_PETITION_SHOW_LIST, 20) { }
|
||||
explicit ServerPetitionShowList() : ServerPacket(SMSG_PETITION_SHOW_LIST, 20) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace WorldPackets
|
||||
class PetitionBuy final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetitionBuy(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_BUY, std::move(packet)) { }
|
||||
explicit PetitionBuy(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_BUY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace WorldPackets
|
||||
class PetitionShowSignatures final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetitionShowSignatures(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_SHOW_SIGNATURES, std::move(packet)) { }
|
||||
explicit PetitionShowSignatures(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_SHOW_SIGNATURES, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace WorldPackets
|
||||
int32 Choice = 0;
|
||||
};
|
||||
|
||||
ServerPetitionShowSignatures() : ServerPacket(SMSG_PETITION_SHOW_SIGNATURES, 40) { }
|
||||
explicit ServerPetitionShowSignatures() : ServerPacket(SMSG_PETITION_SHOW_SIGNATURES, 40) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace WorldPackets
|
||||
class SignPetition final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SignPetition(WorldPacket&& packet) : ClientPacket(CMSG_SIGN_PETITION, std::move(packet)) { }
|
||||
explicit SignPetition(WorldPacket&& packet) : ClientPacket(CMSG_SIGN_PETITION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace WorldPackets
|
||||
class PetitionSignResults final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetitionSignResults() : ServerPacket(SMSG_PETITION_SIGN_RESULTS, 33) { }
|
||||
explicit PetitionSignResults() : ServerPacket(SMSG_PETITION_SIGN_RESULTS, 33) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace WorldPackets
|
||||
class PetitionAlreadySigned final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetitionAlreadySigned() : ServerPacket(SMSG_PETITION_ALREADY_SIGNED, 16) { }
|
||||
explicit PetitionAlreadySigned() : ServerPacket(SMSG_PETITION_ALREADY_SIGNED, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace WorldPackets
|
||||
class DeclinePetition final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
DeclinePetition(WorldPacket&& packet) : ClientPacket(CMSG_DECLINE_PETITION, std::move(packet)) { }
|
||||
explicit DeclinePetition(WorldPacket&& packet) : ClientPacket(CMSG_DECLINE_PETITION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace WorldPackets
|
||||
class TurnInPetition final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
TurnInPetition(WorldPacket&& packet) : ClientPacket(CMSG_TURN_IN_PETITION, std::move(packet)) { }
|
||||
explicit TurnInPetition(WorldPacket&& packet) : ClientPacket(CMSG_TURN_IN_PETITION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace WorldPackets
|
||||
class TurnInPetitionResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TurnInPetitionResult() : ServerPacket(SMSG_TURN_IN_PETITION_RESULT, 4) { }
|
||||
explicit TurnInPetitionResult() : ServerPacket(SMSG_TURN_IN_PETITION_RESULT, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace WorldPackets
|
||||
class OfferPetition final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
OfferPetition(WorldPacket&& packet) : ClientPacket(CMSG_OFFER_PETITION, std::move(packet)) { }
|
||||
explicit OfferPetition(WorldPacket&& packet) : ClientPacket(CMSG_OFFER_PETITION, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace WorldPackets
|
||||
class OfferPetitionError final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
OfferPetitionError() : ServerPacket(SMSG_OFFER_PETITION_ERROR, 16) { }
|
||||
explicit OfferPetitionError() : ServerPacket(SMSG_OFFER_PETITION_ERROR, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -220,7 +220,7 @@ namespace WorldPackets
|
||||
class PetitionRenameGuild final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PetitionRenameGuild(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_RENAME_GUILD, std::move(packet)) { }
|
||||
explicit PetitionRenameGuild(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_RENAME_GUILD, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace WorldPackets
|
||||
class PetitionRenameGuildResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
PetitionRenameGuildResponse() : ServerPacket(SMSG_PETITION_RENAME_GUILD_RESPONSE, 20) { }
|
||||
explicit PetitionRenameGuildResponse() : ServerPacket(SMSG_PETITION_RENAME_GUILD_RESPONSE, 20) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -241,4 +241,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PetitionPackets_h__
|
||||
#endif // TRINITYCORE_PETITION_PACKETS_H
|
||||
|
||||
@@ -22,12 +22,11 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, QuestPOIData const& questPOIData)
|
||||
{
|
||||
data << int32(questPOIData.QuestID);
|
||||
data << int32(questPOIData.Blobs.size());
|
||||
data << WorldPackets::Size<int32>(questPOIData.Blobs);
|
||||
|
||||
for (QuestPOIBlobData const& questPOIBlobData : questPOIData.Blobs)
|
||||
{
|
||||
@@ -43,7 +42,7 @@ ByteBuffer& operator<<(ByteBuffer& data, QuestPOIData const& questPOIData)
|
||||
data << int32(questPOIBlobData.PlayerConditionID);
|
||||
data << int32(questPOIBlobData.NavigationPlayerConditionID);
|
||||
data << int32(questPOIBlobData.SpawnTrackingID);
|
||||
data << int32(questPOIBlobData.Points.size());
|
||||
data << WorldPackets::Size<int32>(questPOIBlobData.Points);
|
||||
|
||||
for (QuestPOIBlobPoint const& questPOIBlobPoint : questPOIBlobData.Points)
|
||||
{
|
||||
@@ -52,7 +51,7 @@ ByteBuffer& operator<<(ByteBuffer& data, QuestPOIData const& questPOIData)
|
||||
data << int16(questPOIBlobPoint.Z);
|
||||
}
|
||||
|
||||
data.WriteBit(questPOIBlobData.AlwaysAllowMergingBlobs);
|
||||
data << WorldPackets::Bits<1>(questPOIBlobData.AlwaysAllowMergingBlobs);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
@@ -97,7 +96,7 @@ WorldPacket const* QueryCreatureResponse::Write()
|
||||
_worldPacket << int32(Stats.CreatureFamily);
|
||||
_worldPacket << int8(Stats.Classification);
|
||||
_worldPacket.append(Stats.ProxyCreatureID.data(), Stats.ProxyCreatureID.size());
|
||||
_worldPacket << uint32(Stats.Display.CreatureDisplay.size());
|
||||
_worldPacket << Size<uint32>(Stats.Display.CreatureDisplay);
|
||||
_worldPacket << float(Stats.Display.TotalProbability);
|
||||
|
||||
for (CreatureXDisplay const& display : Stats.Display.CreatureDisplay)
|
||||
@@ -109,8 +108,8 @@ WorldPacket const* QueryCreatureResponse::Write()
|
||||
|
||||
_worldPacket << float(Stats.HpMulti);
|
||||
_worldPacket << float(Stats.EnergyMulti);
|
||||
_worldPacket << uint32(Stats.QuestItems.size());
|
||||
_worldPacket << uint32(Stats.QuestCurrencies.size());
|
||||
_worldPacket << Size<uint32>(Stats.QuestItems);
|
||||
_worldPacket << Size<uint32>(Stats.QuestCurrencies);
|
||||
_worldPacket << int32(Stats.CreatureMovementInfoID);
|
||||
_worldPacket << int32(Stats.HealthScalingExpansion);
|
||||
_worldPacket << int32(Stats.RequiredExpansion);
|
||||
@@ -136,7 +135,7 @@ WorldPacket const* QueryCreatureResponse::Write()
|
||||
|
||||
void QueryPlayerNames::Read()
|
||||
{
|
||||
Players.resize(_worldPacket.read<uint32>());
|
||||
_worldPacket >> Size<uint32>(Players);
|
||||
for (ObjectGuid& player : Players)
|
||||
_worldPacket >> player;
|
||||
}
|
||||
@@ -151,8 +150,8 @@ bool PlayerGuidLookupData::Initialize(ObjectGuid const& guid, Player const* play
|
||||
{
|
||||
ASSERT(player->GetGUID() == guid);
|
||||
|
||||
AccountID = player->GetSession()->GetAccountGUID();
|
||||
BnetAccountID = player->GetSession()->GetBattlenetAccountGUID();
|
||||
AccountID = player->m_playerData->WowAccount;
|
||||
BnetAccountID = player->m_playerData->BnetAccount;
|
||||
Name = player->GetName();
|
||||
Race = player->GetRace();
|
||||
Sex = player->GetNativeGender();
|
||||
@@ -189,14 +188,14 @@ bool PlayerGuidLookupData::Initialize(ObjectGuid const& guid, Player const* play
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PlayerGuidLookupData const& lookupData)
|
||||
{
|
||||
data.WriteBit(lookupData.IsDeleted);
|
||||
data.WriteBits(lookupData.Name.length(), 6);
|
||||
data << Bits<1>(lookupData.IsDeleted);
|
||||
data << SizedString::BitsSize<6>(lookupData.Name);
|
||||
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
data.WriteBits(lookupData.DeclinedNames.name[i].length(), 7);
|
||||
data << SizedString::BitsSize<7>(lookupData.DeclinedNames.name[i]);
|
||||
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
data.WriteString(lookupData.DeclinedNames.name[i]);
|
||||
data << SizedString::Data(lookupData.DeclinedNames.name[i]);
|
||||
|
||||
data << lookupData.AccountID;
|
||||
data << lookupData.BnetAccountID;
|
||||
@@ -209,7 +208,7 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerGuidLookupData const& lookupData)
|
||||
data << uint8(lookupData.Level);
|
||||
data << uint8(lookupData.PvpFaction);
|
||||
data << int32(lookupData.TimerunningSeasonID);
|
||||
data.WriteString(lookupData.Name);
|
||||
data << SizedString::Data(lookupData.Name);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -218,10 +217,10 @@ ByteBuffer& operator<<(ByteBuffer& data, GuildGuidLookupData const& lookupData)
|
||||
{
|
||||
data << uint32(lookupData.VirtualRealmAddress);
|
||||
data << lookupData.Guid;
|
||||
data.WriteBits(lookupData.Name.length(), 7);
|
||||
data << SizedString::BitsSize<7>(lookupData.Name);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(lookupData.Name);
|
||||
data << SizedString::Data(lookupData.Name);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -230,8 +229,8 @@ ByteBuffer& operator<<(ByteBuffer& data, NameCacheLookupResult const& result)
|
||||
{
|
||||
data << uint8(result.Result);
|
||||
data << result.Player;
|
||||
data.WriteBit(result.Data.has_value());
|
||||
data.WriteBit(result.GuildData.has_value());
|
||||
data << OptionalInit(result.Data);
|
||||
data << OptionalInit(result.GuildData);
|
||||
data.FlushBits();
|
||||
|
||||
if (result.Data)
|
||||
@@ -245,7 +244,7 @@ ByteBuffer& operator<<(ByteBuffer& data, NameCacheLookupResult const& result)
|
||||
|
||||
WorldPacket const* QueryPlayerNamesResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(Players.size());
|
||||
_worldPacket << Size<uint32>(Players);
|
||||
for (NameCacheLookupResult const& lookupResult : Players)
|
||||
_worldPacket << lookupResult;
|
||||
|
||||
@@ -264,10 +263,10 @@ ByteBuffer& operator<<(ByteBuffer& data, QueryPageTextResponse::PageTextInfo con
|
||||
data << uint32(page.NextPageID);
|
||||
data << int32(page.PlayerConditionID);
|
||||
data << uint8(page.Flags);
|
||||
data.WriteBits(page.Text.length(), 12);
|
||||
data << SizedString::BitsSize<12>(page.Text);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(page.Text);
|
||||
data << SizedString::Data(page.Text);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -275,13 +274,12 @@ ByteBuffer& operator<<(ByteBuffer& data, QueryPageTextResponse::PageTextInfo con
|
||||
WorldPacket const* QueryPageTextResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(PageTextID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket << Bits<1>(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
_worldPacket << uint32(Pages.size());
|
||||
_worldPacket << Size<uint32>(Pages);
|
||||
for (PageTextInfo const& pageText : Pages)
|
||||
_worldPacket << pageText;
|
||||
}
|
||||
@@ -298,8 +296,7 @@ void QueryNPCText::Read()
|
||||
WorldPacket const* QueryNPCTextResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(TextID);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
|
||||
_worldPacket << Bits<1>(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << int32(Allow ? (MAX_NPC_TEXT_OPTIONS * (sizeof(float) + sizeof(uint32))) : 0);
|
||||
@@ -323,7 +320,7 @@ WorldPacket const* QueryGameObjectResponse::Write()
|
||||
{
|
||||
_worldPacket << GameObjectID;
|
||||
_worldPacket << Guid;
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket << Bits<1>(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
ByteBuffer statsData;
|
||||
@@ -342,14 +339,14 @@ WorldPacket const* QueryGameObjectResponse::Write()
|
||||
statsData << int32(Stats.Data[i]);
|
||||
|
||||
statsData << float(Stats.Size);
|
||||
statsData << uint8(Stats.QuestItems.size());
|
||||
statsData << Size<uint8>(Stats.QuestItems);
|
||||
if (!Stats.QuestItems.empty())
|
||||
statsData.append(Stats.QuestItems.data(), Stats.QuestItems.size());
|
||||
|
||||
statsData << int32(Stats.ContentTuningId);
|
||||
}
|
||||
|
||||
_worldPacket << uint32(statsData.size());
|
||||
_worldPacket << Size<uint32>(statsData);
|
||||
if (!statsData.empty())
|
||||
_worldPacket.append(statsData);
|
||||
|
||||
@@ -407,8 +404,8 @@ void QuestPOIQuery::Read()
|
||||
|
||||
WorldPacket const* QuestPOIQueryResponse::Write()
|
||||
{
|
||||
_worldPacket << int32(QuestPOIDataStats.size());
|
||||
_worldPacket << int32(QuestPOIDataStats.size());
|
||||
_worldPacket << Size<int32>(QuestPOIDataStats);
|
||||
_worldPacket << Size<int32>(QuestPOIDataStats);
|
||||
|
||||
bool useCache = sWorld->getBoolConfig(CONFIG_CACHE_DATA_QUERIES);
|
||||
|
||||
@@ -432,11 +429,11 @@ void QueryQuestCompletionNPCs::Read()
|
||||
|
||||
WorldPacket const* QuestCompletionNPCResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(QuestCompletionNPCs.size());
|
||||
for (auto& quest : QuestCompletionNPCs)
|
||||
_worldPacket << Size<uint32>(QuestCompletionNPCs);
|
||||
for (QuestCompletionNPC& quest : QuestCompletionNPCs)
|
||||
{
|
||||
_worldPacket << int32(quest.QuestID);
|
||||
_worldPacket << uint32(quest.NPCs.size());
|
||||
_worldPacket << Size<uint32>(quest.NPCs);
|
||||
if (!quest.NPCs.empty())
|
||||
_worldPacket.append(quest.NPCs.data(), quest.NPCs.size());
|
||||
}
|
||||
@@ -452,24 +449,24 @@ void QueryPetName::Read()
|
||||
WorldPacket const* QueryPetNameResponse::Write()
|
||||
{
|
||||
_worldPacket << UnitGUID;
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket << Bits<1>(Allow);
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
_worldPacket.WriteBits(Name.length(), 8);
|
||||
_worldPacket.WriteBit(HasDeclined);
|
||||
_worldPacket << SizedString::BitsSize<8>(Name);
|
||||
_worldPacket << Bits<1>(HasDeclined);
|
||||
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
_worldPacket.WriteBits(DeclinedNames.name[i].length(), 7);
|
||||
_worldPacket << SizedString::BitsSize<7>(DeclinedNames.name[i]);
|
||||
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
_worldPacket.WriteString(DeclinedNames.name[i]);
|
||||
_worldPacket << SizedString::Data(DeclinedNames.name[i]);
|
||||
|
||||
_worldPacket << Timestamp;
|
||||
_worldPacket.WriteString(Name);
|
||||
_worldPacket << SizedString::Data(Name);
|
||||
}
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
else
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -481,17 +478,17 @@ void ItemTextQuery::Read()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemTextCache const& itemTextCache)
|
||||
{
|
||||
data.WriteBits(itemTextCache.Text.length(), 13);
|
||||
data << SizedString::BitsSize<13>(itemTextCache.Text);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(itemTextCache.Text);
|
||||
data << SizedString::Data(itemTextCache.Text);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* QueryItemTextResponse::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(Valid);
|
||||
_worldPacket << Bits<1>(Valid);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket << Item;
|
||||
_worldPacket << Id;
|
||||
@@ -548,8 +545,8 @@ ByteBuffer& operator<<(ByteBuffer& data, TreasurePickCurrency const& treasurePic
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasurePickerBonus const& treasurePickerBonus)
|
||||
{
|
||||
data << uint32(treasurePickerBonus.Items.size());
|
||||
data << uint32(treasurePickerBonus.Currencies.size());
|
||||
data << Size<uint32>(treasurePickerBonus.Items);
|
||||
data << Size<uint32>(treasurePickerBonus.Currencies);
|
||||
data << uint64(treasurePickerBonus.Money);
|
||||
data << Bits<1>(treasurePickerBonus.Context);
|
||||
data.FlushBits();
|
||||
@@ -565,10 +562,10 @@ ByteBuffer& operator<<(ByteBuffer& data, TreasurePickerBonus const& treasurePick
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasurePickerPick const& treasurePickerPick)
|
||||
{
|
||||
data << uint32(treasurePickerPick.Items.size());
|
||||
data << uint32(treasurePickerPick.Currencies.size());
|
||||
data << Size<uint32>(treasurePickerPick.Items);
|
||||
data << Size<uint32>(treasurePickerPick.Currencies);
|
||||
data << uint64(treasurePickerPick.Money);
|
||||
data << uint32(treasurePickerPick.Bonuses.size());
|
||||
data << Size<uint32>(treasurePickerPick.Bonuses);
|
||||
data << int32(treasurePickerPick.Flags);
|
||||
data << Bits<1>(treasurePickerPick.IsChoice);
|
||||
data.FlushBits();
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QueryPackets_h__
|
||||
#define QueryPackets_h__
|
||||
#ifndef TRINITYCORE_QUERY_PACKETS_H
|
||||
#define TRINITYCORE_QUERY_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "AuthenticationPackets.h"
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "ObjectGuid.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include "Position.h"
|
||||
#include "QuestDef.h"
|
||||
#include "RaceMask.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "UnitDefines.h"
|
||||
@@ -33,6 +32,7 @@
|
||||
|
||||
class Player;
|
||||
struct QuestPOIData;
|
||||
enum class QuestRewardContextFlags : int32;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace WorldPackets
|
||||
class QueryCreature final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryCreature(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_CREATURE, std::move(packet)) { }
|
||||
explicit QueryCreature(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_CREATURE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace WorldPackets
|
||||
class QueryCreatureResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryCreatureResponse() : ServerPacket(SMSG_QUERY_CREATURE_RESPONSE, 76) { }
|
||||
explicit QueryCreatureResponse() : ServerPacket(SMSG_QUERY_CREATURE_RESPONSE, 76) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace WorldPackets
|
||||
class QueryPlayerNames final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryPlayerNames(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PLAYER_NAMES, std::move(packet)) { }
|
||||
explicit QueryPlayerNames(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PLAYER_NAMES, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace WorldPackets
|
||||
class QueryPlayerNamesResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryPlayerNamesResponse() : ServerPacket(SMSG_QUERY_PLAYER_NAMES_RESPONSE, 60) { }
|
||||
explicit QueryPlayerNamesResponse() : ServerPacket(SMSG_QUERY_PLAYER_NAMES_RESPONSE, 60) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace WorldPackets
|
||||
class QueryPageText final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryPageText(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PAGE_TEXT, std::move(packet)) { }
|
||||
explicit QueryPageText(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PAGE_TEXT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace WorldPackets
|
||||
class QueryPageTextResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryPageTextResponse() : ServerPacket(SMSG_QUERY_PAGE_TEXT_RESPONSE, 15) { }
|
||||
explicit QueryPageTextResponse() : ServerPacket(SMSG_QUERY_PAGE_TEXT_RESPONSE, 15) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace WorldPackets
|
||||
class QueryNPCText final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryNPCText(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_NPC_TEXT, std::move(packet)) { }
|
||||
explicit QueryNPCText(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_NPC_TEXT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace WorldPackets
|
||||
class QueryNPCTextResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryNPCTextResponse() : ServerPacket(SMSG_QUERY_NPC_TEXT_RESPONSE, 73) { }
|
||||
explicit QueryNPCTextResponse() : ServerPacket(SMSG_QUERY_NPC_TEXT_RESPONSE, 73) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace WorldPackets
|
||||
class QueryGameObject final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryGameObject(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_GAME_OBJECT, std::move(packet)) { }
|
||||
explicit QueryGameObject(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_GAME_OBJECT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace WorldPackets
|
||||
class QueryGameObjectResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryGameObjectResponse() : ServerPacket(SMSG_QUERY_GAME_OBJECT_RESPONSE, 165) { }
|
||||
explicit QueryGameObjectResponse() : ServerPacket(SMSG_QUERY_GAME_OBJECT_RESPONSE, 165) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -253,7 +253,7 @@ namespace WorldPackets
|
||||
class QueryCorpseLocationFromClient final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryCorpseLocationFromClient(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_CORPSE_LOCATION_FROM_CLIENT, std::move(packet)) { }
|
||||
explicit QueryCorpseLocationFromClient(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_CORPSE_LOCATION_FROM_CLIENT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace WorldPackets
|
||||
class CorpseLocation final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CorpseLocation() : ServerPacket(SMSG_CORPSE_LOCATION, 1 + (5 * 4) + 16) { }
|
||||
explicit CorpseLocation() : ServerPacket(SMSG_CORPSE_LOCATION, 1 + (5 * 4) + 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace WorldPackets
|
||||
class QueryCorpseTransport final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryCorpseTransport(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_CORPSE_TRANSPORT , std::move(packet)) { }
|
||||
explicit QueryCorpseTransport(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_CORPSE_TRANSPORT , std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace WorldPackets
|
||||
class CorpseTransportQuery final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CorpseTransportQuery() : ServerPacket(SMSG_CORPSE_TRANSPORT_QUERY, 16) { }
|
||||
explicit CorpseTransportQuery() : ServerPacket(SMSG_CORPSE_TRANSPORT_QUERY, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace WorldPackets
|
||||
class QueryTime final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryTime(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_TIME, std::move(packet)) { }
|
||||
explicit QueryTime(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_TIME, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -309,7 +309,7 @@ namespace WorldPackets
|
||||
class QueryTimeResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryTimeResponse() : ServerPacket(SMSG_QUERY_TIME_RESPONSE, 4 + 4) { }
|
||||
explicit QueryTimeResponse() : ServerPacket(SMSG_QUERY_TIME_RESPONSE, 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -319,7 +319,7 @@ namespace WorldPackets
|
||||
class QuestPOIQuery final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestPOIQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_POI_QUERY, std::move(packet)) { }
|
||||
explicit QuestPOIQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_POI_QUERY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace WorldPackets
|
||||
class QuestPOIQueryResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestPOIQueryResponse() : ServerPacket(SMSG_QUEST_POI_QUERY_RESPONSE, 4 + 4) { }
|
||||
explicit QuestPOIQueryResponse() : ServerPacket(SMSG_QUEST_POI_QUERY_RESPONSE, 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace WorldPackets
|
||||
class QueryQuestCompletionNPCs final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryQuestCompletionNPCs(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_QUEST_COMPLETION_NPCS, std::move(packet)) { }
|
||||
explicit QueryQuestCompletionNPCs(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_QUEST_COMPLETION_NPCS, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace WorldPackets
|
||||
class QuestCompletionNPCResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestCompletionNPCResponse() : ServerPacket(SMSG_QUEST_COMPLETION_NPC_RESPONSE, 4) { }
|
||||
explicit QuestCompletionNPCResponse() : ServerPacket(SMSG_QUEST_COMPLETION_NPC_RESPONSE, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -366,7 +366,7 @@ namespace WorldPackets
|
||||
class QueryPetName final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryPetName(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PET_NAME, std::move(packet)) { }
|
||||
explicit QueryPetName(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_PET_NAME, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace WorldPackets
|
||||
class QueryPetNameResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryPetNameResponse() : ServerPacket(SMSG_QUERY_PET_NAME_RESPONSE, 16 + 1) { }
|
||||
explicit QueryPetNameResponse() : ServerPacket(SMSG_QUERY_PET_NAME_RESPONSE, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -392,7 +392,7 @@ namespace WorldPackets
|
||||
class ItemTextQuery final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ItemTextQuery(WorldPacket&& packet) : ClientPacket(CMSG_ITEM_TEXT_QUERY, std::move(packet)) { }
|
||||
explicit ItemTextQuery(WorldPacket&& packet) : ClientPacket(CMSG_ITEM_TEXT_QUERY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -407,7 +407,7 @@ namespace WorldPackets
|
||||
class QueryItemTextResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryItemTextResponse() : ServerPacket(SMSG_QUERY_ITEM_TEXT_RESPONSE) { }
|
||||
explicit QueryItemTextResponse() : ServerPacket(SMSG_QUERY_ITEM_TEXT_RESPONSE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -419,7 +419,7 @@ namespace WorldPackets
|
||||
class QueryRealmName final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryRealmName(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_REALM_NAME, std::move(packet)) { }
|
||||
explicit QueryRealmName(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_REALM_NAME, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -429,7 +429,7 @@ namespace WorldPackets
|
||||
class RealmQueryResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
RealmQueryResponse() : ServerPacket(SMSG_REALM_QUERY_RESPONSE) { }
|
||||
explicit RealmQueryResponse() : ServerPacket(SMSG_REALM_QUERY_RESPONSE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -441,7 +441,7 @@ namespace WorldPackets
|
||||
class QueryTreasurePicker final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryTreasurePicker(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_TREASURE_PICKER, std::move(packet)) { }
|
||||
explicit QueryTreasurePicker(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_TREASURE_PICKER, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -484,7 +484,7 @@ namespace WorldPackets
|
||||
class TreasurePickerResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
TreasurePickerResponse() : ServerPacket(SMSG_TREASURE_PICKER_RESPONSE) { }
|
||||
explicit TreasurePickerResponse() : ServerPacket(SMSG_TREASURE_PICKER_RESPONSE) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -499,4 +499,4 @@ namespace WorldPackets
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, QuestPOIData const& questPOIData);
|
||||
|
||||
#endif // QueryPackets_h__
|
||||
#endif // TRINITYCORE_QUERY_PACKETS_H
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
#include "QuestPackets.h"
|
||||
#include "Util.h"
|
||||
|
||||
namespace WorldPackets::Quest
|
||||
{
|
||||
@@ -33,10 +32,10 @@ ByteBuffer& operator<<(ByteBuffer& data, ConditionalQuestText const& conditional
|
||||
{
|
||||
data << int32(conditionalQuestText.PlayerConditionID);
|
||||
data << int32(conditionalQuestText.QuestGiverCreatureID);
|
||||
data.WriteBits(conditionalQuestText.Text.length(), 12);
|
||||
data << SizedString::BitsSize<12>(conditionalQuestText.Text);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(conditionalQuestText.Text);
|
||||
data << SizedString::Data(conditionalQuestText.Text);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -56,7 +55,7 @@ WorldPacket const* QuestGiverStatus::Write()
|
||||
|
||||
WorldPacket const* QuestGiverStatusMultiple::Write()
|
||||
{
|
||||
_worldPacket << int32(QuestGiver.size());
|
||||
_worldPacket << Size<int32>(QuestGiver);
|
||||
for (QuestGiverInfo const& questGiver : QuestGiver)
|
||||
{
|
||||
_worldPacket << questGiver.Guid;
|
||||
@@ -81,7 +80,7 @@ WorldPacket const* QueryQuestInfoResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(QuestID);
|
||||
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket << Bits<1>(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (Allow)
|
||||
@@ -100,7 +99,7 @@ WorldPacket const* QueryQuestInfoResponse::Write()
|
||||
_worldPacket << int32(Info.RewardMoneyDifficulty);
|
||||
_worldPacket << float(Info.RewardMoneyMultiplier);
|
||||
_worldPacket << int32(Info.RewardBonusMoney);
|
||||
_worldPacket << uint32(Info.RewardDisplaySpell.size());
|
||||
_worldPacket << Size<uint32>(Info.RewardDisplaySpell);
|
||||
_worldPacket << int32(Info.RewardSpell);
|
||||
_worldPacket << int32(Info.RewardHonor);
|
||||
_worldPacket << float(Info.RewardKillHonor);
|
||||
@@ -165,17 +164,17 @@ WorldPacket const* QueryQuestInfoResponse::Write()
|
||||
_worldPacket << int32(Info.AreaGroupID);
|
||||
_worldPacket << int64(Info.TimeAllowed);
|
||||
|
||||
_worldPacket << uint32(Info.Objectives.size());
|
||||
_worldPacket << Size<uint32>(Info.Objectives);
|
||||
_worldPacket << uint64(Info.AllowableRaces.RawValue);
|
||||
_worldPacket << uint32(Info.TreasurePickerID.size());
|
||||
_worldPacket << uint32(Info.TreasurePickerID2.size());
|
||||
_worldPacket << Size<uint32>(Info.TreasurePickerID);
|
||||
_worldPacket << Size<uint32>(Info.TreasurePickerID2);
|
||||
_worldPacket << int32(Info.Expansion);
|
||||
_worldPacket << int32(Info.ManagedWorldStateID);
|
||||
_worldPacket << int32(Info.QuestSessionBonus);
|
||||
_worldPacket << int32(Info.QuestGiverCreatureID);
|
||||
|
||||
_worldPacket << uint32(Info.ConditionalQuestDescription.size());
|
||||
_worldPacket << uint32(Info.ConditionalQuestCompletionLog.size());
|
||||
_worldPacket << Size<uint32>(Info.ConditionalQuestDescription);
|
||||
_worldPacket << Size<uint32>(Info.ConditionalQuestCompletionLog);
|
||||
|
||||
for (QuestCompleteDisplaySpell const& rewardDisplaySpell : Info.RewardDisplaySpell)
|
||||
_worldPacket << rewardDisplaySpell;
|
||||
@@ -186,15 +185,15 @@ WorldPacket const* QueryQuestInfoResponse::Write()
|
||||
if (!Info.TreasurePickerID2.empty())
|
||||
_worldPacket.append(Info.TreasurePickerID2.data(), Info.TreasurePickerID2.size());
|
||||
|
||||
_worldPacket << BitsSize<9>(Info.LogTitle);
|
||||
_worldPacket << BitsSize<12>(Info.LogDescription);
|
||||
_worldPacket << BitsSize<12>(Info.QuestDescription);
|
||||
_worldPacket << BitsSize<9>(Info.AreaDescription);
|
||||
_worldPacket << BitsSize<10>(Info.PortraitGiverText);
|
||||
_worldPacket << BitsSize<8>(Info.PortraitGiverName);
|
||||
_worldPacket << BitsSize<10>(Info.PortraitTurnInText);
|
||||
_worldPacket << BitsSize<8>(Info.PortraitTurnInName);
|
||||
_worldPacket << BitsSize<11>(Info.QuestCompletionLog);
|
||||
_worldPacket << SizedString::BitsSize<9>(Info.LogTitle);
|
||||
_worldPacket << SizedString::BitsSize<12>(Info.LogDescription);
|
||||
_worldPacket << SizedString::BitsSize<12>(Info.QuestDescription);
|
||||
_worldPacket << SizedString::BitsSize<9>(Info.AreaDescription);
|
||||
_worldPacket << SizedString::BitsSize<10>(Info.PortraitGiverText);
|
||||
_worldPacket << SizedString::BitsSize<8>(Info.PortraitGiverName);
|
||||
_worldPacket << SizedString::BitsSize<10>(Info.PortraitTurnInText);
|
||||
_worldPacket << SizedString::BitsSize<8>(Info.PortraitTurnInName);
|
||||
_worldPacket << SizedString::BitsSize<11>(Info.QuestCompletionLog);
|
||||
_worldPacket << Bits<1>(Info.ResetByScheduler);
|
||||
_worldPacket << Bits<1>(Info.ReadyForTranslation);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -210,25 +209,25 @@ WorldPacket const* QueryQuestInfoResponse::Write()
|
||||
_worldPacket << uint32(questObjective.Flags2);
|
||||
_worldPacket << float(questObjective.ProgressBarWeight);
|
||||
|
||||
_worldPacket << int32(questObjective.VisualEffects.size());
|
||||
_worldPacket << Size<int32>(questObjective.VisualEffects);
|
||||
for (int32 visualEffect : questObjective.VisualEffects)
|
||||
_worldPacket << int32(visualEffect);
|
||||
|
||||
_worldPacket << BitsSize<8>(questObjective.Description);
|
||||
_worldPacket << SizedString::BitsSize<8>(questObjective.Description);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(questObjective.Description);
|
||||
_worldPacket << SizedString::Data(questObjective.Description);
|
||||
}
|
||||
|
||||
_worldPacket.WriteString(Info.LogTitle);
|
||||
_worldPacket.WriteString(Info.LogDescription);
|
||||
_worldPacket.WriteString(Info.QuestDescription);
|
||||
_worldPacket.WriteString(Info.AreaDescription);
|
||||
_worldPacket.WriteString(Info.PortraitGiverText);
|
||||
_worldPacket.WriteString(Info.PortraitGiverName);
|
||||
_worldPacket.WriteString(Info.PortraitTurnInText);
|
||||
_worldPacket.WriteString(Info.PortraitTurnInName);
|
||||
_worldPacket.WriteString(Info.QuestCompletionLog);
|
||||
_worldPacket << SizedString::Data(Info.LogTitle);
|
||||
_worldPacket << SizedString::Data(Info.LogDescription);
|
||||
_worldPacket << SizedString::Data(Info.QuestDescription);
|
||||
_worldPacket << SizedString::Data(Info.AreaDescription);
|
||||
_worldPacket << SizedString::Data(Info.PortraitGiverText);
|
||||
_worldPacket << SizedString::Data(Info.PortraitGiverName);
|
||||
_worldPacket << SizedString::Data(Info.PortraitTurnInText);
|
||||
_worldPacket << SizedString::Data(Info.PortraitTurnInName);
|
||||
_worldPacket << SizedString::Data(Info.QuestCompletionLog);
|
||||
|
||||
for (ConditionalQuestText const& conditionalQuestText : Info.ConditionalQuestDescription)
|
||||
_worldPacket << conditionalQuestText;
|
||||
@@ -348,7 +347,7 @@ ByteBuffer& operator<<(ByteBuffer& data, QuestRewards const& questRewards)
|
||||
|
||||
data << int32(questRewards.SkillLineID);
|
||||
data << int32(questRewards.NumSkillUps);
|
||||
data << uint32(questRewards.TreasurePickerID.size());
|
||||
data << Size<uint32>(questRewards.TreasurePickerID);
|
||||
if (!questRewards.TreasurePickerID.empty())
|
||||
data.append(questRewards.TreasurePickerID.data(), questRewards.TreasurePickerID.size());
|
||||
|
||||
@@ -367,7 +366,7 @@ ByteBuffer& operator<<(ByteBuffer& data, QuestRewards const& questRewards)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, QuestGiverOfferReward const& offer)
|
||||
{
|
||||
data << offer.Rewards; // QuestRewards
|
||||
data << int32(offer.Emotes.size());
|
||||
data << Size<int32>(offer.Emotes);
|
||||
data << offer.QuestGiverGUID;
|
||||
data.append(offer.QuestFlags);
|
||||
data << int32(offer.QuestGiverCreatureID);
|
||||
@@ -397,25 +396,25 @@ WorldPacket const* QuestGiverOfferRewardMessage::Write()
|
||||
_worldPacket << int32(PortraitGiverModelSceneID);
|
||||
_worldPacket << int32(PortraitTurnIn);
|
||||
_worldPacket << int32(QuestGiverCreatureID);
|
||||
_worldPacket << uint32(ConditionalRewardText.size());
|
||||
_worldPacket << Size<uint32>(ConditionalRewardText);
|
||||
|
||||
_worldPacket << BitsSize<9>(QuestTitle);
|
||||
_worldPacket << BitsSize<12>(RewardText);
|
||||
_worldPacket << BitsSize<10>(PortraitGiverText);
|
||||
_worldPacket << BitsSize<8>(PortraitGiverName);
|
||||
_worldPacket << BitsSize<10>(PortraitTurnInText);
|
||||
_worldPacket << BitsSize<8>(PortraitTurnInName);
|
||||
_worldPacket << SizedString::BitsSize<9>(QuestTitle);
|
||||
_worldPacket << SizedString::BitsSize<12>(RewardText);
|
||||
_worldPacket << SizedString::BitsSize<10>(PortraitGiverText);
|
||||
_worldPacket << SizedString::BitsSize<8>(PortraitGiverName);
|
||||
_worldPacket << SizedString::BitsSize<10>(PortraitTurnInText);
|
||||
_worldPacket << SizedString::BitsSize<8>(PortraitTurnInName);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (ConditionalQuestText const& conditionalQuestText : ConditionalRewardText)
|
||||
_worldPacket << conditionalQuestText;
|
||||
|
||||
_worldPacket.WriteString(QuestTitle);
|
||||
_worldPacket.WriteString(RewardText);
|
||||
_worldPacket.WriteString(PortraitGiverText);
|
||||
_worldPacket.WriteString(PortraitGiverName);
|
||||
_worldPacket.WriteString(PortraitTurnInText);
|
||||
_worldPacket.WriteString(PortraitTurnInName);
|
||||
_worldPacket << SizedString::Data(QuestTitle);
|
||||
_worldPacket << SizedString::Data(RewardText);
|
||||
_worldPacket << SizedString::Data(PortraitGiverText);
|
||||
_worldPacket << SizedString::Data(PortraitGiverName);
|
||||
_worldPacket << SizedString::Data(PortraitTurnInText);
|
||||
_worldPacket << SizedString::Data(PortraitTurnInName);
|
||||
|
||||
return &_worldPacket;
|
||||
};
|
||||
@@ -434,10 +433,10 @@ WorldPacket const* QuestGiverQuestComplete::Write()
|
||||
_worldPacket << int64(MoneyReward);
|
||||
_worldPacket << int32(SkillLineIDReward);
|
||||
_worldPacket << int32(NumSkillUpsReward);
|
||||
_worldPacket.WriteBit(UseQuestReward);
|
||||
_worldPacket.WriteBit(LaunchGossip);
|
||||
_worldPacket.WriteBit(LaunchQuest);
|
||||
_worldPacket.WriteBit(HideChatMessage);
|
||||
_worldPacket << Bits<1>(UseQuestReward);
|
||||
_worldPacket << Bits<1>(LaunchGossip);
|
||||
_worldPacket << Bits<1>(LaunchQuest);
|
||||
_worldPacket << Bits<1>(HideChatMessage);
|
||||
|
||||
_worldPacket << ItemReward;
|
||||
|
||||
@@ -448,7 +447,7 @@ void QuestGiverCompleteQuest::Read()
|
||||
{
|
||||
_worldPacket >> QuestGiverGUID;
|
||||
_worldPacket >> QuestID;
|
||||
FromScript = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(FromScript);
|
||||
}
|
||||
|
||||
void QuestGiverCloseQuest::Read()
|
||||
@@ -468,14 +467,14 @@ WorldPacket const* QuestGiverQuestDetails::Write()
|
||||
_worldPacket << int32(PortraitTurnIn);
|
||||
_worldPacket.append(QuestFlags);
|
||||
_worldPacket << int32(SuggestedPartyMembers);
|
||||
_worldPacket << uint32(LearnSpells.size());
|
||||
_worldPacket << uint32(DescEmotes.size());
|
||||
_worldPacket << uint32(Objectives.size());
|
||||
_worldPacket << Size<uint32>(LearnSpells);
|
||||
_worldPacket << Size<uint32>(DescEmotes);
|
||||
_worldPacket << Size<uint32>(Objectives);
|
||||
_worldPacket << int32(QuestStartItemID);
|
||||
_worldPacket << int32(QuestInfoID);
|
||||
_worldPacket << int32(QuestSessionBonus);
|
||||
_worldPacket << int32(QuestGiverCreatureID);
|
||||
_worldPacket << uint32(ConditionalDescriptionText.size());
|
||||
_worldPacket << Size<uint32>(ConditionalDescriptionText);
|
||||
|
||||
for (int32 spell : LearnSpells)
|
||||
_worldPacket << int32(spell);
|
||||
@@ -494,13 +493,13 @@ WorldPacket const* QuestGiverQuestDetails::Write()
|
||||
_worldPacket << int32(obj.Amount);
|
||||
}
|
||||
|
||||
_worldPacket << BitsSize<9>(QuestTitle);
|
||||
_worldPacket << BitsSize<12>(DescriptionText);
|
||||
_worldPacket << BitsSize<12>(LogDescription);
|
||||
_worldPacket << BitsSize<10>(PortraitGiverText);
|
||||
_worldPacket << BitsSize<8>(PortraitGiverName);
|
||||
_worldPacket << BitsSize<10>(PortraitTurnInText);
|
||||
_worldPacket << BitsSize<8>(PortraitTurnInName);
|
||||
_worldPacket << SizedString::BitsSize<9>(QuestTitle);
|
||||
_worldPacket << SizedString::BitsSize<12>(DescriptionText);
|
||||
_worldPacket << SizedString::BitsSize<12>(LogDescription);
|
||||
_worldPacket << SizedString::BitsSize<10>(PortraitGiverText);
|
||||
_worldPacket << SizedString::BitsSize<8>(PortraitGiverName);
|
||||
_worldPacket << SizedString::BitsSize<10>(PortraitTurnInText);
|
||||
_worldPacket << SizedString::BitsSize<8>(PortraitTurnInName);
|
||||
_worldPacket << Bits<1>(AutoLaunched);
|
||||
_worldPacket << Bits<1>(FromContentPush);
|
||||
_worldPacket << Bits<1>(false); // unused in client
|
||||
@@ -510,13 +509,13 @@ WorldPacket const* QuestGiverQuestDetails::Write()
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << Rewards; // QuestRewards
|
||||
_worldPacket.WriteString(QuestTitle);
|
||||
_worldPacket.WriteString(DescriptionText);
|
||||
_worldPacket.WriteString(LogDescription);
|
||||
_worldPacket.WriteString(PortraitGiverText);
|
||||
_worldPacket.WriteString(PortraitGiverName);
|
||||
_worldPacket.WriteString(PortraitTurnInText);
|
||||
_worldPacket.WriteString(PortraitTurnInName);
|
||||
_worldPacket << SizedString::Data(QuestTitle);
|
||||
_worldPacket << SizedString::Data(DescriptionText);
|
||||
_worldPacket << SizedString::Data(LogDescription);
|
||||
_worldPacket << SizedString::Data(PortraitGiverText);
|
||||
_worldPacket << SizedString::Data(PortraitGiverName);
|
||||
_worldPacket << SizedString::Data(PortraitTurnInText);
|
||||
_worldPacket << SizedString::Data(PortraitTurnInName);
|
||||
|
||||
for (ConditionalQuestText const& conditionalQuestText : ConditionalDescriptionText)
|
||||
_worldPacket << conditionalQuestText;
|
||||
@@ -526,8 +525,8 @@ WorldPacket const* QuestGiverQuestDetails::Write()
|
||||
|
||||
WorldPacket const* QuestGiverRequestItems::Write()
|
||||
{
|
||||
_worldPacket << int32(Collect.size());
|
||||
_worldPacket << int32(Currency.size());
|
||||
_worldPacket << Size<int32>(Collect);
|
||||
_worldPacket << Size<int32>(Currency);
|
||||
_worldPacket << QuestGiverGUID;
|
||||
_worldPacket.append(QuestFlags);
|
||||
_worldPacket << int32(StatusFlags);
|
||||
@@ -557,17 +556,17 @@ WorldPacket const* QuestGiverRequestItems::Write()
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << int32(QuestGiverCreatureID);
|
||||
_worldPacket << uint32(ConditionalCompletionText.size());
|
||||
_worldPacket << Size<uint32>(ConditionalCompletionText);
|
||||
|
||||
_worldPacket << BitsSize<9>(QuestTitle);
|
||||
_worldPacket << BitsSize<12>(CompletionText);
|
||||
_worldPacket << SizedString::BitsSize<9>(QuestTitle);
|
||||
_worldPacket << SizedString::BitsSize<12>(CompletionText);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (ConditionalQuestText const& conditionalQuestText : ConditionalCompletionText)
|
||||
_worldPacket << conditionalQuestText;
|
||||
|
||||
_worldPacket.WriteString(QuestTitle);
|
||||
_worldPacket.WriteString(CompletionText);
|
||||
_worldPacket << SizedString::Data(QuestTitle);
|
||||
_worldPacket << SizedString::Data(CompletionText);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -582,14 +581,14 @@ void QuestGiverQueryQuest::Read()
|
||||
{
|
||||
_worldPacket >> QuestGiverGUID;
|
||||
_worldPacket >> QuestID;
|
||||
RespondToGiver = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(RespondToGiver);
|
||||
}
|
||||
|
||||
void QuestGiverAcceptQuest::Read()
|
||||
{
|
||||
_worldPacket >> QuestGiverGUID;
|
||||
_worldPacket >> QuestID;
|
||||
StartCheat = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(StartCheat);
|
||||
}
|
||||
|
||||
void QuestLogRemoveQuest::Read()
|
||||
@@ -602,14 +601,14 @@ WorldPacket const* QuestGiverQuestListMessage::Write()
|
||||
_worldPacket << QuestGiverGUID;
|
||||
_worldPacket << uint32(GreetEmoteDelay);
|
||||
_worldPacket << uint32(GreetEmoteType);
|
||||
_worldPacket << uint32(QuestDataText.size());
|
||||
_worldPacket.WriteBits(Greeting.size(), 11);
|
||||
_worldPacket << Size<uint32>(QuestDataText);
|
||||
_worldPacket << SizedString::BitsSize<11>(Greeting);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (NPC::ClientGossipText const& gossip : QuestDataText)
|
||||
_worldPacket << gossip;
|
||||
|
||||
_worldPacket.WriteString(Greeting);
|
||||
_worldPacket << SizedString::Data(Greeting);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -626,10 +625,10 @@ WorldPacket const* QuestConfirmAcceptResponse::Write()
|
||||
_worldPacket << uint32(QuestID);
|
||||
_worldPacket << InitiatedBy;
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.size(), 10);
|
||||
_worldPacket << SizedString::BitsSize<10>(QuestTitle);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(QuestTitle);
|
||||
_worldPacket << SizedString::Data(QuestTitle);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -644,10 +643,10 @@ WorldPacket const* QuestPushResultResponse::Write()
|
||||
_worldPacket << SenderGUID;
|
||||
_worldPacket << uint8(Result);
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.size(), 9);
|
||||
_worldPacket << SizedString::BitsSize<9>(QuestTitle);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(QuestTitle);
|
||||
_worldPacket << SizedString::Data(QuestTitle);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -664,12 +663,11 @@ WorldPacket const* QuestGiverInvalidQuest::Write()
|
||||
_worldPacket << uint32(Reason);
|
||||
_worldPacket << int32(ContributionRewardID);
|
||||
|
||||
_worldPacket.WriteBit(SendErrorMessage);
|
||||
_worldPacket.WriteBits(ReasonText.length(), 9);
|
||||
|
||||
_worldPacket << Bits<1>(SendErrorMessage);
|
||||
_worldPacket << SizedString::BitsSize<9>(ReasonText);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(ReasonText);
|
||||
_worldPacket << SizedString::Data(ReasonText);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -710,7 +708,7 @@ WorldPacket const* QuestForceRemoved::Write()
|
||||
|
||||
WorldPacket const* WorldQuestUpdateResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(WorldQuestUpdates.size());
|
||||
_worldPacket << Size<uint32>(WorldQuestUpdates);
|
||||
|
||||
for (WorldQuestUpdateInfo const& worldQuestUpdate : WorldQuestUpdates)
|
||||
{
|
||||
@@ -728,6 +726,7 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerChoiceResponseRewardEntry const&
|
||||
{
|
||||
data << playerChoiceResponseRewardEntry.Item;
|
||||
data << int32(playerChoiceResponseRewardEntry.Quantity);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -741,10 +740,10 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerChoiceResponseReward const& playe
|
||||
data << uint32(playerChoiceResponseReward.HonorPointCount);
|
||||
data << uint64(playerChoiceResponseReward.Money);
|
||||
data << uint32(playerChoiceResponseReward.Xp);
|
||||
data << uint32(playerChoiceResponseReward.Items.size());
|
||||
data << uint32(playerChoiceResponseReward.Currencies.size());
|
||||
data << uint32(playerChoiceResponseReward.Factions.size());
|
||||
data << uint32(playerChoiceResponseReward.ItemChoices.size());
|
||||
data << Size<uint32>(playerChoiceResponseReward.Items);
|
||||
data << Size<uint32>(playerChoiceResponseReward.Currencies);
|
||||
data << Size<uint32>(playerChoiceResponseReward.Factions);
|
||||
data << Size<uint32>(playerChoiceResponseReward.ItemChoices);
|
||||
|
||||
for (PlayerChoiceResponseRewardEntry const& item : playerChoiceResponseReward.Items)
|
||||
data << item;
|
||||
@@ -768,7 +767,7 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerChoiceResponseMawPower const& pla
|
||||
data << int32(playerChoiceResponseMawPower.Unused901_2);
|
||||
data << int32(playerChoiceResponseMawPower.SpellID);
|
||||
data << int32(playerChoiceResponseMawPower.MaxStacks);
|
||||
data.WriteBit(playerChoiceResponseMawPower.Rarity.has_value());
|
||||
data << OptionalInit(playerChoiceResponseMawPower.Rarity);
|
||||
data.FlushBits();
|
||||
|
||||
if (playerChoiceResponseMawPower.Rarity)
|
||||
@@ -789,26 +788,26 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerChoiceResponse const& playerChoic
|
||||
data << uint8(playerChoiceResponse.GroupID);
|
||||
data << int32(playerChoiceResponse.UiTextureKitID);
|
||||
|
||||
data.WriteBits(playerChoiceResponse.Answer.length(), 9);
|
||||
data.WriteBits(playerChoiceResponse.Header.length(), 9);
|
||||
data.WriteBits(playerChoiceResponse.SubHeader.length() , 7);
|
||||
data.WriteBits(playerChoiceResponse.ButtonTooltip.length(), 9);
|
||||
data.WriteBits(playerChoiceResponse.Description.length(), 11);
|
||||
data.WriteBits(playerChoiceResponse.Confirmation.length(), 7);
|
||||
data.WriteBit(playerChoiceResponse.RewardQuestID.has_value());
|
||||
data.WriteBit(playerChoiceResponse.Reward.has_value());
|
||||
data.WriteBit(playerChoiceResponse.MawPower.has_value());
|
||||
data << SizedString::BitsSize<9>(playerChoiceResponse.Answer);
|
||||
data << SizedString::BitsSize<9>(playerChoiceResponse.Header);
|
||||
data << SizedString::BitsSize<7>(playerChoiceResponse.SubHeader);
|
||||
data << SizedString::BitsSize<9>(playerChoiceResponse.ButtonTooltip);
|
||||
data << SizedString::BitsSize<11>(playerChoiceResponse.Description);
|
||||
data << SizedString::BitsSize<7>(playerChoiceResponse.Confirmation);
|
||||
data << OptionalInit(playerChoiceResponse.RewardQuestID);
|
||||
data << OptionalInit(playerChoiceResponse.Reward);
|
||||
data << OptionalInit(playerChoiceResponse.MawPower);
|
||||
data.FlushBits();
|
||||
|
||||
if (playerChoiceResponse.Reward)
|
||||
data << *playerChoiceResponse.Reward;
|
||||
|
||||
data.WriteString(playerChoiceResponse.Answer);
|
||||
data.WriteString(playerChoiceResponse.Header);
|
||||
data.WriteString(playerChoiceResponse.SubHeader);
|
||||
data.WriteString(playerChoiceResponse.ButtonTooltip);
|
||||
data.WriteString(playerChoiceResponse.Description);
|
||||
data.WriteString(playerChoiceResponse.Confirmation);
|
||||
data << SizedString::Data(playerChoiceResponse.Answer);
|
||||
data << SizedString::Data(playerChoiceResponse.Header);
|
||||
data << SizedString::Data(playerChoiceResponse.SubHeader);
|
||||
data << SizedString::Data(playerChoiceResponse.ButtonTooltip);
|
||||
data << SizedString::Data(playerChoiceResponse.Description);
|
||||
data << SizedString::Data(playerChoiceResponse.Confirmation);
|
||||
|
||||
if (playerChoiceResponse.RewardQuestID)
|
||||
data << uint32(*playerChoiceResponse.RewardQuestID);
|
||||
@@ -822,27 +821,28 @@ ByteBuffer& operator<<(ByteBuffer& data, PlayerChoiceResponse const& playerChoic
|
||||
WorldPacket const* DisplayPlayerChoice::Write()
|
||||
{
|
||||
_worldPacket << int32(ChoiceID);
|
||||
_worldPacket << uint32(Responses.size());
|
||||
_worldPacket << Size<uint32>(Responses);
|
||||
_worldPacket << SenderGUID;
|
||||
_worldPacket << int32(UiTextureKitID);
|
||||
_worldPacket << uint32(SoundKitID);
|
||||
_worldPacket << uint32(CloseUISoundKitID);
|
||||
_worldPacket << uint8(NumRerolls);
|
||||
_worldPacket << Duration;
|
||||
_worldPacket.WriteBits(Question.length(), 8);
|
||||
_worldPacket.WriteBits(PendingChoiceText.length(), 8);
|
||||
_worldPacket.WriteBit(InfiniteRange);
|
||||
_worldPacket.WriteBit(HideWarboardHeader);
|
||||
_worldPacket.WriteBit(KeepOpenAfterChoice);
|
||||
_worldPacket.WriteBit(Unknown_1115_1);
|
||||
_worldPacket.WriteBit(Unknown_1115_2);
|
||||
_worldPacket << SizedString::BitsSize<8>(Question);
|
||||
_worldPacket << SizedString::BitsSize<8>(PendingChoiceText);
|
||||
_worldPacket << Bits<1>(InfiniteRange);
|
||||
_worldPacket << Bits<1>(HideWarboardHeader);
|
||||
_worldPacket << Bits<1>(KeepOpenAfterChoice);
|
||||
_worldPacket << Bits<1>(Unknown_1115_1);
|
||||
_worldPacket << Bits<1>(Unknown_1115_2);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (PlayerChoiceResponse const& response : Responses)
|
||||
_worldPacket << response;
|
||||
|
||||
_worldPacket.WriteString(Question);
|
||||
_worldPacket.WriteString(PendingChoiceText);
|
||||
_worldPacket << SizedString::Data(Question);
|
||||
_worldPacket << SizedString::Data(PendingChoiceText);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -850,15 +850,15 @@ void ChoiceResponse::Read()
|
||||
{
|
||||
_worldPacket >> ChoiceID;
|
||||
_worldPacket >> ResponseIdentifier;
|
||||
IsReroll = _worldPacket.ReadBit();
|
||||
_worldPacket >> Bits<1>(IsReroll);
|
||||
}
|
||||
|
||||
WorldPacket const* UiMapQuestLinesResponse::Write()
|
||||
{
|
||||
_worldPacket << int32(UiMapID);
|
||||
_worldPacket << uint32(QuestLineXQuestIDs.size());
|
||||
_worldPacket << uint32(QuestIDs.size());
|
||||
_worldPacket << uint32(QuestLineIDs.size());
|
||||
_worldPacket << Size<uint32>(QuestLineXQuestIDs);
|
||||
_worldPacket << Size<uint32>(QuestIDs);
|
||||
_worldPacket << Size<uint32>(QuestLineIDs);
|
||||
|
||||
for (uint32 const& questLineQuestID : QuestLineXQuestIDs)
|
||||
_worldPacket << uint32(questLineQuestID);
|
||||
@@ -877,17 +877,19 @@ void UiMapQuestLinesRequest::Read()
|
||||
_worldPacket >> UiMapID;
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Quest::SpawnTrackingRequestInfo& spawnTrackingRequestInfo)
|
||||
ByteBuffer& operator>>(ByteBuffer& data, SpawnTrackingRequestInfo& spawnTrackingRequestInfo)
|
||||
{
|
||||
data >> spawnTrackingRequestInfo.ObjectTypeMask;
|
||||
data >> spawnTrackingRequestInfo.ObjectID;
|
||||
data >> spawnTrackingRequestInfo.SpawnTrackingID;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void SpawnTrackingUpdate::Read()
|
||||
{
|
||||
SpawnTrackingRequests.resize(_worldPacket.read<uint32>());
|
||||
uint32 requests = _worldPacket.read<uint32>();
|
||||
SpawnTrackingRequests.resize(requests);
|
||||
for (SpawnTrackingRequestInfo& spawnTrackingRequestInfo : SpawnTrackingRequests)
|
||||
_worldPacket >> spawnTrackingRequestInfo;
|
||||
}
|
||||
@@ -908,7 +910,7 @@ ByteBuffer& operator<<(ByteBuffer& data, SpawnTrackingResponseInfo const& spawnT
|
||||
|
||||
WorldPacket const* QuestPOIUpdateResponse::Write()
|
||||
{
|
||||
_worldPacket << uint32(SpawnTrackingResponses.size());
|
||||
_worldPacket << Size<uint32>(SpawnTrackingResponses);
|
||||
|
||||
for (SpawnTrackingResponseInfo const& spawnTrackingResponseInfo : SpawnTrackingResponses)
|
||||
_worldPacket << spawnTrackingResponseInfo;
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QuestPackets_h__
|
||||
#define QuestPackets_h__
|
||||
#ifndef TRINITYCORE_QUEST_PACKETS_H
|
||||
#define TRINITYCORE_QUEST_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "NPCPackets.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "QuestDef.h"
|
||||
#include "RaceMask.h"
|
||||
#include <array>
|
||||
|
||||
namespace WorldPackets
|
||||
@@ -33,7 +34,7 @@ namespace WorldPackets
|
||||
class QuestGiverStatusQuery final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverStatusQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_STATUS_QUERY, std::move(packet)) { }
|
||||
explicit QuestGiverStatusQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_STATUS_QUERY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -44,7 +45,7 @@ namespace WorldPackets
|
||||
class QuestGiverStatusMultipleQuery final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverStatusMultipleQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_STATUS_MULTIPLE_QUERY, std::move(packet)) { }
|
||||
explicit QuestGiverStatusMultipleQuery(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_STATUS_MULTIPLE_QUERY, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -62,7 +63,7 @@ namespace WorldPackets
|
||||
class QuestGiverStatus final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverStatus() : ServerPacket(SMSG_QUEST_GIVER_STATUS, 22) { }
|
||||
explicit QuestGiverStatus() : ServerPacket(SMSG_QUEST_GIVER_STATUS, 22) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -72,7 +73,7 @@ namespace WorldPackets
|
||||
class QuestGiverStatusMultiple final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverStatusMultiple() : ServerPacket(SMSG_QUEST_GIVER_STATUS_MULTIPLE, 24) { }
|
||||
explicit QuestGiverStatusMultiple() : ServerPacket(SMSG_QUEST_GIVER_STATUS_MULTIPLE, 24) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -82,7 +83,7 @@ namespace WorldPackets
|
||||
class QuestGiverHello final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverHello(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_HELLO, std::move(packet)) { }
|
||||
explicit QuestGiverHello(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_HELLO, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -92,7 +93,7 @@ namespace WorldPackets
|
||||
class QueryQuestInfo final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QueryQuestInfo(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_QUEST_INFO, std::move(packet)) { }
|
||||
explicit QueryQuestInfo(WorldPacket&& packet) : ClientPacket(CMSG_QUERY_QUEST_INFO, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -203,7 +204,7 @@ namespace WorldPackets
|
||||
class QueryQuestInfoResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QueryQuestInfoResponse() : ServerPacket(SMSG_QUERY_QUEST_INFO_RESPONSE, 1200) { }
|
||||
explicit QueryQuestInfoResponse() : ServerPacket(SMSG_QUERY_QUEST_INFO_RESPONSE, 1200) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -215,7 +216,7 @@ namespace WorldPackets
|
||||
class QuestUpdateAddCredit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestUpdateAddCredit() : ServerPacket(SMSG_QUEST_UPDATE_ADD_CREDIT, 16 + 4 + 4 + 2 + 2 + 1) { }
|
||||
explicit QuestUpdateAddCredit() : ServerPacket(SMSG_QUEST_UPDATE_ADD_CREDIT, 16 + 4 + 4 + 2 + 2 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -230,7 +231,7 @@ namespace WorldPackets
|
||||
class QuestUpdateAddCreditSimple final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestUpdateAddCreditSimple() : ServerPacket(SMSG_QUEST_UPDATE_ADD_CREDIT_SIMPLE, 4 + 4 + 1) { }
|
||||
explicit QuestUpdateAddCreditSimple() : ServerPacket(SMSG_QUEST_UPDATE_ADD_CREDIT_SIMPLE, 4 + 4 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -242,7 +243,7 @@ namespace WorldPackets
|
||||
class QuestUpdateAddPvPCredit final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestUpdateAddPvPCredit() : ServerPacket(SMSG_QUEST_UPDATE_ADD_PVP_CREDIT, 4 + 2) { }
|
||||
explicit QuestUpdateAddPvPCredit() : ServerPacket(SMSG_QUEST_UPDATE_ADD_PVP_CREDIT, 4 + 2) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -323,7 +324,7 @@ namespace WorldPackets
|
||||
class QuestGiverOfferRewardMessage final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverOfferRewardMessage() : ServerPacket(SMSG_QUEST_GIVER_OFFER_REWARD_MESSAGE, 600) { }
|
||||
explicit QuestGiverOfferRewardMessage() : ServerPacket(SMSG_QUEST_GIVER_OFFER_REWARD_MESSAGE, 600) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -346,7 +347,7 @@ namespace WorldPackets
|
||||
class QuestGiverChooseReward final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverChooseReward(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_CHOOSE_REWARD, std::move(packet)) { }
|
||||
explicit QuestGiverChooseReward(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_CHOOSE_REWARD, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -358,7 +359,7 @@ namespace WorldPackets
|
||||
class QuestGiverQuestComplete final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverQuestComplete() : ServerPacket(SMSG_QUEST_GIVER_QUEST_COMPLETE, 40) { }
|
||||
explicit QuestGiverQuestComplete() : ServerPacket(SMSG_QUEST_GIVER_QUEST_COMPLETE, 40) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -377,7 +378,7 @@ namespace WorldPackets
|
||||
class QuestGiverCompleteQuest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverCompleteQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_COMPLETE_QUEST, std::move(packet)) { }
|
||||
explicit QuestGiverCompleteQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_COMPLETE_QUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -389,7 +390,7 @@ namespace WorldPackets
|
||||
class QuestGiverCloseQuest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverCloseQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_CLOSE_QUEST, std::move(packet)) { }
|
||||
explicit QuestGiverCloseQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_CLOSE_QUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -407,7 +408,7 @@ namespace WorldPackets
|
||||
class QuestGiverQuestDetails final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverQuestDetails() : ServerPacket(SMSG_QUEST_GIVER_QUEST_DETAILS, 1000) { }
|
||||
explicit QuestGiverQuestDetails() : ServerPacket(SMSG_QUEST_GIVER_QUEST_DETAILS, 1000) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -462,7 +463,7 @@ namespace WorldPackets
|
||||
class QuestGiverRequestItems final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverRequestItems() : ServerPacket(SMSG_QUEST_GIVER_REQUEST_ITEMS, 300) { }
|
||||
explicit QuestGiverRequestItems() : ServerPacket(SMSG_QUEST_GIVER_REQUEST_ITEMS, 300) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -488,7 +489,7 @@ namespace WorldPackets
|
||||
class QuestGiverRequestReward final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverRequestReward(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_REQUEST_REWARD, std::move(packet)) { }
|
||||
explicit QuestGiverRequestReward(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_REQUEST_REWARD, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -499,7 +500,7 @@ namespace WorldPackets
|
||||
class QuestGiverQueryQuest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverQueryQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_QUERY_QUEST, std::move(packet)) { }
|
||||
explicit QuestGiverQueryQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_QUERY_QUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -511,7 +512,7 @@ namespace WorldPackets
|
||||
class QuestGiverAcceptQuest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverAcceptQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_ACCEPT_QUEST, std::move(packet)) { }
|
||||
explicit QuestGiverAcceptQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_GIVER_ACCEPT_QUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -523,7 +524,7 @@ namespace WorldPackets
|
||||
class QuestLogRemoveQuest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestLogRemoveQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_LOG_REMOVE_QUEST, std::move(packet)) { }
|
||||
explicit QuestLogRemoveQuest(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_LOG_REMOVE_QUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -533,7 +534,7 @@ namespace WorldPackets
|
||||
class QuestGiverQuestListMessage final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverQuestListMessage() : ServerPacket(SMSG_QUEST_GIVER_QUEST_LIST_MESSAGE, 100) { }
|
||||
explicit QuestGiverQuestListMessage() : ServerPacket(SMSG_QUEST_GIVER_QUEST_LIST_MESSAGE, 100) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -547,7 +548,7 @@ namespace WorldPackets
|
||||
class QuestUpdateComplete final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestUpdateComplete() : ServerPacket(SMSG_QUEST_UPDATE_COMPLETE, 4) { }
|
||||
explicit QuestUpdateComplete() : ServerPacket(SMSG_QUEST_UPDATE_COMPLETE, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -557,7 +558,7 @@ namespace WorldPackets
|
||||
class QuestConfirmAcceptResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestConfirmAcceptResponse() : ServerPacket(SMSG_QUEST_CONFIRM_ACCEPT, 21) { }
|
||||
explicit QuestConfirmAcceptResponse() : ServerPacket(SMSG_QUEST_CONFIRM_ACCEPT, 21) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -569,7 +570,7 @@ namespace WorldPackets
|
||||
class QuestConfirmAccept final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestConfirmAccept(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_CONFIRM_ACCEPT, std::move(packet)) { }
|
||||
explicit QuestConfirmAccept(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_CONFIRM_ACCEPT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -579,7 +580,7 @@ namespace WorldPackets
|
||||
class QuestPushResultResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestPushResultResponse() : ServerPacket(SMSG_QUEST_PUSH_RESULT, 16 + 1) { }
|
||||
explicit QuestPushResultResponse() : ServerPacket(SMSG_QUEST_PUSH_RESULT, 16 + 1) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -591,7 +592,7 @@ namespace WorldPackets
|
||||
class QuestLogFull final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestLogFull() : ServerPacket(SMSG_QUEST_LOG_FULL, 0) { }
|
||||
explicit QuestLogFull() : ServerPacket(SMSG_QUEST_LOG_FULL, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
@@ -599,7 +600,7 @@ namespace WorldPackets
|
||||
class QuestPushResult final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
QuestPushResult(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_PUSH_RESULT, std::move(packet)) { }
|
||||
explicit QuestPushResult(WorldPacket&& packet) : ClientPacket(CMSG_QUEST_PUSH_RESULT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -611,7 +612,7 @@ namespace WorldPackets
|
||||
class QuestGiverInvalidQuest final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverInvalidQuest() : ServerPacket(SMSG_QUEST_GIVER_INVALID_QUEST, 6) { }
|
||||
explicit QuestGiverInvalidQuest() : ServerPacket(SMSG_QUEST_GIVER_INVALID_QUEST, 6) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -624,7 +625,7 @@ namespace WorldPackets
|
||||
class QuestUpdateFailedTimer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestUpdateFailedTimer() : ServerPacket(SMSG_QUEST_UPDATE_FAILED_TIMER, 4) { }
|
||||
explicit QuestUpdateFailedTimer() : ServerPacket(SMSG_QUEST_UPDATE_FAILED_TIMER, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -634,7 +635,7 @@ namespace WorldPackets
|
||||
class QuestGiverQuestFailed final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestGiverQuestFailed() : ServerPacket(SMSG_QUEST_GIVER_QUEST_FAILED, 8) { }
|
||||
explicit QuestGiverQuestFailed() : ServerPacket(SMSG_QUEST_GIVER_QUEST_FAILED, 8) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -645,7 +646,7 @@ namespace WorldPackets
|
||||
class PushQuestToParty final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
PushQuestToParty(WorldPacket&& packet) : ClientPacket(CMSG_PUSH_QUEST_TO_PARTY, std::move(packet)) { }
|
||||
explicit PushQuestToParty(WorldPacket&& packet) : ClientPacket(CMSG_PUSH_QUEST_TO_PARTY, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -655,7 +656,7 @@ namespace WorldPackets
|
||||
class DailyQuestsReset final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
DailyQuestsReset() : ServerPacket(SMSG_DAILY_QUESTS_RESET, 4) { }
|
||||
explicit DailyQuestsReset() : ServerPacket(SMSG_DAILY_QUESTS_RESET, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -675,7 +676,7 @@ namespace WorldPackets
|
||||
class RequestWorldQuestUpdate final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
RequestWorldQuestUpdate(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_WORLD_QUEST_UPDATE, std::move(packet)) { }
|
||||
explicit RequestWorldQuestUpdate(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_WORLD_QUEST_UPDATE, std::move(packet)) { }
|
||||
|
||||
void Read() override { }
|
||||
};
|
||||
@@ -695,7 +696,7 @@ namespace WorldPackets
|
||||
class WorldQuestUpdateResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
WorldQuestUpdateResponse() : ServerPacket(SMSG_WORLD_QUEST_UPDATE_RESPONSE, 100) { }
|
||||
explicit WorldQuestUpdateResponse() : ServerPacket(SMSG_WORLD_QUEST_UPDATE_RESPONSE, 100) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -783,7 +784,7 @@ namespace WorldPackets
|
||||
class ChoiceResponse final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
ChoiceResponse(WorldPacket&& packet) : ClientPacket(CMSG_CHOICE_RESPONSE, std::move(packet)) { }
|
||||
explicit ChoiceResponse(WorldPacket&& packet) : ClientPacket(CMSG_CHOICE_RESPONSE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -795,7 +796,7 @@ namespace WorldPackets
|
||||
class UiMapQuestLinesResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
UiMapQuestLinesResponse() : ServerPacket(SMSG_UI_MAP_QUEST_LINES_RESPONSE, 4) { }
|
||||
explicit UiMapQuestLinesResponse() : ServerPacket(SMSG_UI_MAP_QUEST_LINES_RESPONSE, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -808,7 +809,7 @@ namespace WorldPackets
|
||||
class UiMapQuestLinesRequest final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
UiMapQuestLinesRequest(WorldPacket&& packet) : ClientPacket(CMSG_UI_MAP_QUEST_LINES_REQUEST, std::move(packet)) { }
|
||||
explicit UiMapQuestLinesRequest(WorldPacket&& packet) : ClientPacket(CMSG_UI_MAP_QUEST_LINES_REQUEST, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -825,7 +826,7 @@ namespace WorldPackets
|
||||
class SpawnTrackingUpdate final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
SpawnTrackingUpdate(WorldPacket&& packet) : ClientPacket(CMSG_SPAWN_TRACKING_UPDATE, std::move(packet)) { }
|
||||
explicit SpawnTrackingUpdate(WorldPacket&& packet) : ClientPacket(CMSG_SPAWN_TRACKING_UPDATE, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
@@ -845,7 +846,7 @@ namespace WorldPackets
|
||||
class QuestPOIUpdateResponse final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
QuestPOIUpdateResponse() : ServerPacket(SMSG_QUEST_POI_UPDATE_RESPONSE, 21) { }
|
||||
explicit QuestPOIUpdateResponse() : ServerPacket(SMSG_QUEST_POI_UPDATE_RESPONSE, 21) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -855,7 +856,7 @@ namespace WorldPackets
|
||||
class ForceSpawnTrackingUpdate final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ForceSpawnTrackingUpdate() : ServerPacket(SMSG_FORCE_SPAWN_TRACKING_UPDATE, 4) { }
|
||||
explicit ForceSpawnTrackingUpdate() : ServerPacket(SMSG_FORCE_SPAWN_TRACKING_UPDATE, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -864,4 +865,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // QuestPackets_h__
|
||||
#endif // TRINITYCORE_QUEST_PACKETS_H
|
||||
|
||||
@@ -16,15 +16,20 @@
|
||||
*/
|
||||
|
||||
#include "ReferAFriendPackets.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
WorldPacket const* WorldPackets::RaF::RecruitAFriendFailure::Write()
|
||||
namespace WorldPackets::RaF
|
||||
{
|
||||
WorldPacket const* RecruitAFriendFailure::Write()
|
||||
{
|
||||
_worldPacket << int32(Reason);
|
||||
// Client uses this string only if Reason == ERR_REFER_A_FRIEND_NOT_IN_GROUP || Reason == ERR_REFER_A_FRIEND_SUMMON_OFFLINE_S
|
||||
// but always reads it from packet
|
||||
_worldPacket.WriteBits(Str.length(), 6);
|
||||
_worldPacket << SizedString::BitsSize<6>(Str);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Str);
|
||||
|
||||
_worldPacket << SizedString::Data(Str);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ReferAFriendPackets_h__
|
||||
#define ReferAFriendPackets_h__
|
||||
#ifndef TRINITYCORE_REFER_A_FRIEND_PACKETS_H
|
||||
#define TRINITYCORE_REFER_A_FRIEND_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
|
||||
@@ -37,4 +37,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // ReferAFriendPackets_h__
|
||||
#endif // TRINITYCORE_REFER_A_FRIEND_PACKETS_H
|
||||
|
||||
@@ -41,8 +41,8 @@ ByteBuffer& operator<<(ByteBuffer& data, FactionBonusData const& factionBonusDat
|
||||
|
||||
WorldPacket const* WorldPackets::Reputation::InitializeFactions::Write()
|
||||
{
|
||||
_worldPacket << uint32(Factions.size());
|
||||
_worldPacket << uint32(Bonuses.size());
|
||||
_worldPacket << Size<uint32>(Factions);
|
||||
_worldPacket << Size<uint32>(Bonuses);
|
||||
|
||||
for (FactionData const& faction : Factions)
|
||||
_worldPacket << faction;
|
||||
@@ -58,17 +58,18 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Reputation::FactionStandi
|
||||
data << int32(factionStanding.Index);
|
||||
data << int32(factionStanding.Standing);
|
||||
data << int32(factionStanding.FactionID);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Reputation::SetFactionStanding::Write()
|
||||
{
|
||||
_worldPacket << float(BonusFromAchievementSystem);
|
||||
_worldPacket << uint32(Faction.size());
|
||||
_worldPacket << Size<uint32>(Faction);
|
||||
for (FactionStandingData const& factionStanding : Faction)
|
||||
_worldPacket << factionStanding;
|
||||
|
||||
_worldPacket.WriteBit(ShowVisual);
|
||||
_worldPacket << Bits<1>(ShowVisual);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ReputationPackets_h__
|
||||
#define ReputationPackets_h__
|
||||
#ifndef TRINITYCORE_REPUTATION_PACKETS_H
|
||||
#define TRINITYCORE_REPUTATION_PACKETS_H
|
||||
|
||||
#include "Packet.h"
|
||||
#include <array>
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -52,7 +51,6 @@ namespace WorldPackets
|
||||
struct FactionStandingData
|
||||
{
|
||||
FactionStandingData() { }
|
||||
FactionStandingData(int32 index, int32 standing) : Index(index), Standing(standing) { }
|
||||
FactionStandingData(int32 index, int32 standing, int32 factionId) : Index(index), Standing(standing), FactionID(factionId) { }
|
||||
|
||||
int32 Index = 0;
|
||||
@@ -74,4 +72,4 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#endif // ReputationPackets_h__
|
||||
#endif // TRINITYCORE_REPUTATION_PACKETS_H
|
||||
|
||||
@@ -131,6 +131,7 @@ WorldSession::WorldSession(uint32 id, std::string&& name, uint32 battlenetAccoun
|
||||
m_sessionDbLocaleIndex(locale),
|
||||
_timezoneOffset(timezoneOffset),
|
||||
m_latency(0),
|
||||
_tutorials(),
|
||||
_tutorialsChanged(TUTORIALS_FLAG_NONE),
|
||||
_filterAddonMessages(false),
|
||||
recruiterId(recruiter),
|
||||
@@ -147,8 +148,6 @@ WorldSession::WorldSession(uint32 id, std::string&& name, uint32 battlenetAccoun
|
||||
_battlePetMgr(std::make_unique<BattlePets::BattlePetMgr>(this)),
|
||||
_collectionMgr(std::make_unique<CollectionMgr>(this))
|
||||
{
|
||||
memset(_tutorials, 0, sizeof(_tutorials));
|
||||
|
||||
if (sock)
|
||||
{
|
||||
m_Address = sock->GetRemoteIpAddress().to_string();
|
||||
@@ -935,7 +934,7 @@ void WorldSession::SendAccountDataTimes(ObjectGuid playerGuid, uint32 mask)
|
||||
|
||||
void WorldSession::LoadTutorialsData(PreparedQueryResult result)
|
||||
{
|
||||
memset(_tutorials, 0, sizeof(uint32) * MAX_ACCOUNT_TUTORIAL_VALUES);
|
||||
_tutorials = { };
|
||||
|
||||
if (result)
|
||||
{
|
||||
@@ -950,7 +949,7 @@ void WorldSession::LoadTutorialsData(PreparedQueryResult result)
|
||||
void WorldSession::SendTutorialsData()
|
||||
{
|
||||
WorldPackets::Misc::TutorialFlags packet;
|
||||
memcpy(packet.TutorialData, _tutorials, sizeof(_tutorials));
|
||||
packet.TutorialData = _tutorials;
|
||||
SendPacket(packet.Write());
|
||||
}
|
||||
|
||||
|
||||
@@ -1987,7 +1987,7 @@ class TC_GAME_API WorldSession
|
||||
Minutes _timezoneOffset;
|
||||
std::atomic<uint32> m_latency;
|
||||
AccountData _accountData[NUM_ACCOUNT_DATA_TYPES];
|
||||
uint32 _tutorials[MAX_ACCOUNT_TUTORIAL_VALUES];
|
||||
std::array<uint32, MAX_ACCOUNT_TUTORIAL_VALUES> _tutorials;
|
||||
uint8 _tutorialsChanged;
|
||||
std::vector<std::string> _registeredAddonPrefixes;
|
||||
bool _filterAddonMessages;
|
||||
|
||||
Reference in New Issue
Block a user