TrinityCore
Loading...
Searching...
No Matches
BattlegroundPackets.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 BattlegroundPackets_h__
19#define BattlegroundPackets_h__
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23#include "Optional.h"
24#include "Position.h"
25#include <array>
26#include <variant>
27
28namespace WorldPackets
29{
30 namespace Battleground
31 {
41
51
62
64 {
65 public:
67
68 void Read() override { }
69 };
70
72 {
73 public:
75
76 void Read() override { }
77 };
78
80 {
81 std::array<int32,2 > Prematch = { };
82 std::array<int32,2 > Postmatch = { };
83 std::array<int32,2 > PrematchMMR = { };
84 };
85
87 {
89 std::array<std::string_view, 2> TeamName;
90 };
91
98
100 {
103 std::variant<PVPLogData_Honor, uint8> HonorOrFaction;
106 std::vector<uint32> Stats;
107 };
108
110 {
111 public:
113
114 WorldPacket const* Write() override;
115
117 std::vector<PVPLogData_Player> Players;
119 };
120
130
132 {
133 public:
135
136 WorldPacket const* Write() override;
137
139 };
140
153
168
180
191
193
206
219
221 {
222 public:
224
225 void Read() override;
226
228 };
229
231 {
232 public:
234
235 void Read() override;
236
238 bool AcceptedInvite = false;
239 };
240
242 {
243 public:
245
246 void Read() override;
247
249 bool PvpAnywhere = false;
250 bool NoXpGain = false;
251 };
252
275
283
285 {
286 public:
288
289 void Read() override;
290
292 };
293
295 {
296 public:
298
299 WorldPacket const* Write() override;
300
302 {
304 PVP_REPORT_AFK_GENERIC_FAILURE = 1, // there are more error codes but they are impossible to receive without modifying the client
307 };
308
313 };
314
322
331
333 {
334 public:
336
337 WorldPacket const* Write() override;
338
339 std::vector<BattlegroundPlayerPosition> Players;
340 std::vector<BattlegroundPlayerPosition> FlagCarriers;
341 };
342
352
362
364 {
365 public:
367
368 WorldPacket const* Write() override;
369
371 };
372 }
373}
374
375#endif // BattlegroundPackets_h__
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint64_t uint64
Definition Define.h:132
uint32_t uint32
Definition Define.h:133
std::vector< BattlegroundPlayerPosition > Players
std::vector< BattlegroundPlayerPosition > FlagCarriers
@ SMSG_GROUP_JOINED_BATTLEGROUND
Definition Opcodes.h:773
@ CMSG_REPORT_PVP_AFK
Definition Opcodes.h:1025
@ SMSG_BATTLEFIELD_LIST
Definition Opcodes.h:602
@ SMSG_AREA_SPIRIT_HEALER_TIME
Definition Opcodes.h:769
@ SMSG_BATTLEFIELD_STATUS
Definition Opcodes.h:753
@ CMSG_BATTLEFIELD_STATUS
Definition Opcodes.h:752
@ CMSG_BATTLEMASTER_JOIN
Definition Opcodes.h:779
@ MSG_BATTLEGROUND_PLAYER_POSITIONS
Definition Opcodes.h:774
@ MSG_PVP_LOG_DATA
Definition Opcodes.h:765
@ CMSG_AREA_SPIRIT_HEALER_QUEUE
Definition Opcodes.h:768
@ CMSG_BATTLEFIELD_LIST
Definition Opcodes.h:601
@ CMSG_LEAVE_BATTLEFIELD
Definition Opcodes.h:766
@ CMSG_AREA_SPIRIT_HEALER_QUERY
Definition Opcodes.h:767
@ SMSG_REPORT_PVP_AFK_RESULT
Definition Opcodes.h:1026
@ SMSG_ARENA_UNIT_DESTROYED
Definition Opcodes.h:1252
@ SMSG_BATTLEGROUND_PLAYER_LEFT
Definition Opcodes.h:778
@ CMSG_BATTLEMASTER_JOIN_ARENA
Definition Opcodes.h:885
@ CMSG_HEARTH_AND_RESURRECT
Definition Opcodes.h:1209
@ CMSG_BATTLEFIELD_PORT
Definition Opcodes.h:754
@ SMSG_BATTLEGROUND_PLAYER_JOINED
Definition Opcodes.h:777
STL namespace.
BattlegroundPlayerPosition(ObjectGuid const &guid, TaggedPosition< Position::XY > const &pos)
std::array< std::string_view, 2 > TeamName
std::variant< PVPLogData_Honor, uint8 > HonorOrFaction