TrinityCore
Loading...
Searching...
No Matches
PartyPackets.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITYCORE_PARTY_PACKETS_H
19#define TRINITYCORE_PARTY_PACKETS_H
20
21#include "Packet.h"
23#include "ObjectGuid.h"
25#include "Optional.h"
26#include "Position.h"
27
28class Player;
29struct RaidMarker;
30enum class PingSubjectType : uint8;
31enum class RestrictPingsTo : int32;
32
33namespace WorldPackets
34{
35 namespace Party
36 {
37 class PartyCommandResult final : public ServerPacket
38 {
39 public:
41
42 WorldPacket const* Write() override;
43
44 std::string Name;
49 };
50
51 class PartyInviteClient final : public ClientPacket
52 {
53 public:
54 explicit PartyInviteClient(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_INVITE, std::move(packet)) { }
55
56 void Read() override;
57
60 std::string TargetName;
61 std::string TargetRealm;
63 };
64
65 class PartyInvite final : public ServerPacket
66 {
67 public:
69
70 WorldPacket const* Write() override;
71
72 void Initialize(Player const* inviter, int32 proposedRoles, bool canAccept);
73
74 bool ShouldSquelch = false;
75 bool AllowMultipleRoles = false;
76 bool QuestSessionActive = false;
77 bool IsCrossFaction = false;
79
80 bool CanAccept = false;
81
82 // Inviter
86 std::string InviterName;
87
88 // Realm
89 bool IsXRealm = false;
90 bool IsXNativeRealm = false;
91
92 // Lfg
95 std::vector<uint32> LfgSlots;
96 };
97
98 class PartyInviteResponse final : public ClientPacket
99 {
100 public:
102
103 void Read() override;
104
106 bool Accept = false;
108 };
109
110 class PartyUninvite final : public ClientPacket
111 {
112 public:
113 explicit PartyUninvite(WorldPacket&& packet) : ClientPacket(CMSG_PARTY_UNINVITE, std::move(packet)) { }
114
115 void Read() override;
116
119 std::string Reason;
120 };
121
122 class GroupDecline final : public ServerPacket
123 {
124 public:
125 explicit GroupDecline(std::string const& name) : ServerPacket(SMSG_GROUP_DECLINE, 2 + name.size()), Name(name) { }
126
127 WorldPacket const* Write() override;
128
129 std::string Name;
130 };
131
132 class GroupUninvite final : public ServerPacket
133 {
134 public:
136
137 WorldPacket const* Write() override;
138
140 };
141
143 {
144 public:
146
147 void Read() override;
148
151 };
152
154 {
156 uint16 Id = 0u;
157 };
158
160 {
163 std::vector<PartyMemberPhase> List;
164 };
165
167 {
171 std::vector<float> Points;
172 };
173
175 {
177 std::string Name;
179
182
183 std::vector<PartyMemberAuraStates> Auras;
184 };
185
187 {
188 std::span<uint32 const> ConditionalFlags;
191 };
192
226
228 {
229 public:
231
232 WorldPacket const* Write() override;
233 void Initialize(Player const* player);
234
235 bool ForEnemy = false;
238 };
239
240 class SetPartyLeader final : public ClientPacket
241 {
242 public:
243 explicit SetPartyLeader(WorldPacket&& packet) : ClientPacket(CMSG_SET_PARTY_LEADER, std::move(packet)) { }
244
245 void Read() override;
246
249 };
250
251 class SetRole final : public ClientPacket
252 {
253 public:
254 explicit SetRole(WorldPacket&& packet) : ClientPacket(CMSG_SET_ROLE, std::move(packet)) { }
255
256 void Read() override;
257
261 };
262
263 class RoleChangedInform final : public ServerPacket
264 {
265 public:
267
268 WorldPacket const* Write() override;
269
275 };
276
277 class LeaveGroup final : public ClientPacket
278 {
279 public:
280 explicit LeaveGroup(WorldPacket&& packet) : ClientPacket(CMSG_LEAVE_GROUP, std::move(packet)) { }
281
282 void Read() override;
283
285 };
286
287 class SetLootMethod final : public ClientPacket
288 {
289 public:
290 explicit SetLootMethod(WorldPacket&& packet) : ClientPacket(CMSG_SET_LOOT_METHOD, std::move(packet)) { }
291
292 void Read() override;
293
298 };
299
300 class MinimapPingClient final : public ClientPacket
301 {
302 public:
303 explicit MinimapPingClient(WorldPacket&& packet) : ClientPacket(CMSG_MINIMAP_PING, std::move(packet)) { }
304
305 void Read() override;
306
308 float PositionX = 0.f;
309 float PositionY = 0.f;
310 };
311
312 class MinimapPing final : public ServerPacket
313 {
314 public:
316
317 WorldPacket const* Write() override;
318
320 float PositionX = 0.f;
321 float PositionY = 0.f;
322 };
323
324 class UpdateRaidTarget final : public ClientPacket
325 {
326 public:
327 explicit UpdateRaidTarget(WorldPacket&& packet) : ClientPacket(CMSG_UPDATE_RAID_TARGET, std::move(packet)) { }
328
329 void Read() override;
330
334 };
335
348
350 {
351 public:
353
354 WorldPacket const* Write() override;
355
357 std::vector<std::pair<uint8, ObjectGuid>> TargetIcons;
358 };
359
360 class ConvertRaid final : public ClientPacket
361 {
362 public:
363 explicit ConvertRaid(WorldPacket&& packet) : ClientPacket(CMSG_CONVERT_RAID, std::move(packet)) { }
364
365 void Read() override;
366
367 bool Raid = false;
368 };
369
371 {
372 public:
374
375 void Read() override;
376
378 };
379
380 class SetAssistantLeader final : public ClientPacket
381 {
382 public:
384
385 void Read() override;
386
389 bool Apply = false;
390 };
391
392 class SetPartyAssignment final : public ClientPacket
393 {
394 public:
396
397 void Read() override;
401 bool Set = false;
402 };
403
404 class DoReadyCheck final : public ClientPacket
405 {
406 public:
407 explicit DoReadyCheck(WorldPacket&& packet) : ClientPacket(CMSG_DO_READY_CHECK, std::move(packet)) { }
408
409 void Read() override;
410
412 };
413
426
428 {
429 public:
431
432 void Read() override;
433
435 bool IsReady = false;
436 };
437
438 class ReadyCheckResponse final : public ServerPacket
439 {
440 public:
442
443 WorldPacket const* Write() override;
444
447 bool IsReady = false;
448 };
449
451 {
452 public:
454
455 WorldPacket const* Write() override;
456
459 };
460
461 class RequestRaidInfo final : public ClientPacket
462 {
463 public:
464 explicit RequestRaidInfo(WorldPacket&& packet) : ClientPacket(CMSG_REQUEST_RAID_INFO, std::move(packet)) { }
465
466 void Read() override { }
467 };
468
469 class OptOutOfLoot final : public ClientPacket
470 {
471 public:
472 explicit OptOutOfLoot(WorldPacket&& packet) : ClientPacket(CMSG_OPT_OUT_OF_LOOT, std::move(packet)) { }
473
474 void Read() override;
475
476 bool PassOnLoot = false;
477 };
478
479 class InitiateRolePoll final : public ClientPacket
480 {
481 public:
482 explicit InitiateRolePoll(WorldPacket&& packet) : ClientPacket(CMSG_INITIATE_ROLE_POLL, std::move(packet)) { }
483
484 void Read() override;
485
487 };
488
489 class RolePollInform final : public ServerPacket
490 {
491 public:
493
494 WorldPacket const* Write() override;
495
498 };
499
500 class GroupNewLeader final : public ServerPacket
501 {
502 public:
504
505 WorldPacket const* Write() override;
506
508 std::string Name;
509 };
510
524
526 {
528 std::string Name;
529 std::string VoiceStateID; // same as bgs.protocol.club.v1.MemberVoiceState.id
536 bool FromSocialQueue = false;
537 bool VoiceChatSilenced = false;
538 bool Connected = false;
539 };
540
554
561
568
582
610
612 {
613 public:
615
616 void Read() override;
617
620 };
621
622 class ChangeSubGroup final : public ClientPacket
623 {
624 public:
625 explicit ChangeSubGroup(WorldPacket&& packet) : ClientPacket(CMSG_CHANGE_SUB_GROUP, std::move(packet)) { }
626
627 void Read() override;
628
632 };
633
634 class SwapSubGroups final : public ClientPacket
635 {
636 public:
637 explicit SwapSubGroups(WorldPacket&& packet) : ClientPacket(CMSG_SWAP_SUB_GROUPS, std::move(packet)) { }
638
639 void Read() override;
640
644 };
645
646 class ClearRaidMarker final : public ClientPacket
647 {
648 public:
649 explicit ClearRaidMarker(WorldPacket&& packet) : ClientPacket(CMSG_CLEAR_RAID_MARKER, std::move(packet)) { }
650
651 void Read() override;
652
654 };
655
656 class RaidMarkersChanged final : public ServerPacket
657 {
658 public:
660
661 WorldPacket const* Write() override;
662
665
666 std::vector<RaidMarker const*> RaidMarkers;
667 };
668
669 class PartyKillLog final : public ServerPacket
670 {
671 public:
673
674 WorldPacket const* Write() override;
675
678 };
679
680 class GroupDestroyed final : public ServerPacket
681 {
682 public:
684
685 WorldPacket const* Write() override { return &_worldPacket; }
686 };
687
689 {
690 public:
692
693 WorldPacket const* Write() override;
694
696 };
697
699 {
700 public:
702
703 WorldPacket const* Write() override;
704
706 bool Accepted = false;
707 };
708
710 {
711 public:
713
714 void Read() override;
715
718 };
719
735
751
767
783
784 class CancelPingPin final : public ServerPacket
785 {
786 public:
788
789 WorldPacket const* Write() override;
790
793 };
794 }
795}
796
797#endif // TRINITYCORE_PARTY_PACKETS_H
uint8_t uint8
Definition Define.h:156
int16_t int16
Definition Define.h:151
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
RestrictPingsTo
Definition Group.h:195
PingSubjectType
Definition Group.h:183
LootMethod
Definition Loot.h:89
@ SMSG_RECEIVE_PING_UNIT
Definition Opcodes.h:2199
@ SMSG_READY_CHECK_COMPLETED
Definition Opcodes.h:2192
@ SMSG_PARTY_COMMAND_RESULT
Definition Opcodes.h:2030
@ SMSG_BROADCAST_SUMMON_CAST
Definition Opcodes.h:1238
@ SMSG_SEND_RAID_TARGET_UPDATE_ALL
Definition Opcodes.h:2262
@ SMSG_BROADCAST_SUMMON_RESPONSE
Definition Opcodes.h:1239
@ SMSG_RECEIVE_PING_WORLD_POINT
Definition Opcodes.h:2200
@ SMSG_GROUP_UNINVITE
Definition Opcodes.h:1585
@ SMSG_ROLE_POLL_INFORM
Definition Opcodes.h:2238
@ SMSG_PARTY_MEMBER_FULL_STATE
Definition Opcodes.h:2034
@ SMSG_PARTY_INVITE
Definition Opcodes.h:2032
@ SMSG_GROUP_DESTROYED
Definition Opcodes.h:1582
@ SMSG_SEND_RAID_TARGET_UPDATE_SINGLE
Definition Opcodes.h:2263
@ SMSG_GROUP_NEW_LEADER
Definition Opcodes.h:1583
@ SMSG_PARTY_KILL_LOG
Definition Opcodes.h:2033
@ SMSG_ROLE_CHANGED_INFORM
Definition Opcodes.h:2236
@ SMSG_RAID_MARKERS_CHANGED
Definition Opcodes.h:2189
@ SMSG_PARTY_UPDATE
Definition Opcodes.h:2037
@ SMSG_READY_CHECK_STARTED
Definition Opcodes.h:2194
@ SMSG_GROUP_DECLINE
Definition Opcodes.h:1581
@ SMSG_MINIMAP_PING
Definition Opcodes.h:1846
@ SMSG_CANCEL_PING_PIN
Definition Opcodes.h:1271
@ SMSG_READY_CHECK_RESPONSE
Definition Opcodes.h:2193
@ CMSG_REQUEST_PARTY_JOIN_UPDATES
Definition Opcodes.h:848
@ CMSG_CHANGE_SUB_GROUP
Definition Opcodes.h:184
@ CMSG_CONVERT_RAID
Definition Opcodes.h:297
@ CMSG_READY_CHECK_RESPONSE
Definition Opcodes.h:814
@ CMSG_SWAP_SUB_GROUPS
Definition Opcodes.h:981
@ CMSG_SET_ASSISTANT_LEADER
Definition Opcodes.h:902
@ CMSG_OPT_OUT_OF_LOOT
Definition Opcodes.h:718
@ CMSG_DO_READY_CHECK
Definition Opcodes.h:336
@ CMSG_SEND_PING_UNIT
Definition Opcodes.h:891
@ CMSG_MINIMAP_PING
Definition Opcodes.h:581
@ CMSG_SET_PARTY_LEADER
Definition Opcodes.h:921
@ CMSG_LEAVE_GROUP
Definition Opcodes.h:524
@ CMSG_SET_EVERYONE_IS_ASSISTANT
Definition Opcodes.h:911
@ CMSG_SET_PARTY_ASSIGNMENT
Definition Opcodes.h:920
@ CMSG_CLEAR_RAID_MARKER
Definition Opcodes.h:248
@ CMSG_PARTY_INVITE_RESPONSE
Definition Opcodes.h:721
@ CMSG_INITIATE_ROLE_POLL
Definition Opcodes.h:506
@ CMSG_SET_ROLE
Definition Opcodes.h:930
@ CMSG_REQUEST_RAID_INFO
Definition Opcodes.h:853
@ CMSG_SET_RESTRICT_PINGS_TO_ASSISTANTS
Definition Opcodes.h:929
@ CMSG_PARTY_INVITE
Definition Opcodes.h:720
@ CMSG_PARTY_UNINVITE
Definition Opcodes.h:722
@ CMSG_SET_LOOT_METHOD
Definition Opcodes.h:918
@ CMSG_UPDATE_RAID_TARGET
Definition Opcodes.h:1021
@ CMSG_SEND_PING_WORLD_POINT
Definition Opcodes.h:892
@ CMSG_REQUEST_PARTY_MEMBER_STATS
Definition Opcodes.h:849
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
PhaseShiftFlags
Definition PhaseShift.h:34
PowerType
WorldPacket _worldPacket
Definition Packet.h:43
WorldPacket const * Write() override
WorldPacket const * Write() override
ChangeSubGroup(WorldPacket &&packet)
ClearRaidMarker(WorldPacket &&packet)
ConvertRaid(WorldPacket &&packet)
DoReadyCheck(WorldPacket &&packet)
GroupDecline(std::string const &name)
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
InitiateRolePoll(WorldPacket &&packet)
LeaveGroup(WorldPacket &&packet)
MinimapPingClient(WorldPacket &&packet)
WorldPacket const * Write() override
OptOutOfLoot(WorldPacket &&packet)
WorldPacket const * Write() override
PartyInviteClient(WorldPacket &&packet)
std::vector< uint32 > LfgSlots
void Initialize(Player const *inviter, int32 proposedRoles, bool canAccept)
Auth::VirtualRealmInfo InviterRealm
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
PartyUninvite(WorldPacket &&packet)
Optional< PartyLootSettings > LootSettings
Optional< PartyDifficultySettings > DifficultySettings
Optional< ChallengeModeData > ChallengeMode
std::vector< PartyPlayerInfo > PlayerList
WorldPacket const * Write() override
Optional< PartyLFGInfo > LfgInfos
WorldPacket const * Write() override
std::vector< RaidMarker const * > RaidMarkers
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPackets::Duration< Milliseconds > Duration
Duration< Milliseconds, int32 > PingDuration
WorldPacket const * Write() override
Duration< Milliseconds, int32 > PingDuration
WorldPacket const * Write() override
TaggedPosition< Position::XYZ > Point
RequestRaidInfo(WorldPacket &&packet)
WorldPacket const * Write() override
WorldPacket const * Write() override
SendPingUnit(WorldPacket &&packet)
Optional< uint32 > SpellOverrideNameID
Duration< Milliseconds, int32 > PingDuration
TaggedPosition< Position::XYZ > Point
Duration< Milliseconds, int32 > PingDuration
std::vector< std::pair< uint8, ObjectGuid > > TargetIcons
SetLootMethod(WorldPacket &&packet)
SetPartyLeader(WorldPacket &&packet)
Optional< uint8 > PartyIndex
SetRole(WorldPacket &&packet)
SwapSubGroups(WorldPacket &&packet)
UpdateRaidTarget(WorldPacket &&packet)
STL namespace.
std::span< uint32 const > ConditionalFlags
Duration< Milliseconds > InstanceAbandonVoteCooldown
std::vector< PartyMemberAuraStates > Auras
std::vector< PartyMemberPhase > List
Optional< PartyMemberPetStats > PetStats
std::vector< PartyMemberAuraStates > Auras
MythicPlus::DungeonScoreSummary DungeonScore