TrinityCore
BattlenetPackets.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 BattlenetPackets_h__
19#define BattlenetPackets_h__
20
21#include "Packet.h"
23#include "MessageBuffer.h"
24#include <array>
25
26namespace WorldPackets
27{
28 namespace Battlenet
29 {
31 {
35
36 uint32 GetServiceHash() const { return uint32(Type >> 32); }
37 uint32 GetMethodId() const { return uint32(Type & 0xFFFFFFFF); }
38 };
39
40 class Notification final : public ServerPacket
41 {
42 public:
44
45 WorldPacket const* Write() override;
46
49 };
50
51 class Response final : public ServerPacket
52 {
53 public:
54 Response() : ServerPacket(SMSG_BATTLENET_RESPONSE, 4 + 8 + 8 + 4 + 4) { }
55
56 WorldPacket const* Write() override;
57
61 };
62
63 class ConnectionStatus final : public ServerPacket
64 {
65 public:
67
68 WorldPacket const* Write() override;
69
72 };
73
75 {
76 public:
78
79 WorldPacket const* Write() override;
80
82 bool Allow = false;
84 };
85
86 class Request final : public ClientPacket
87 {
88 public:
90
91 void Read() override;
92
95 };
96
97 class ChangeRealmTicket final : public ClientPacket
98 {
99 public:
101
102 void Read() override;
103
105 std::array<uint8, 32> Secret = { };
106 };
107 }
108}
109
110#endif // BattlenetPackets_h__
BattlenetRpcErrorCode
uint8_t uint8
Definition: Define.h:144
uint64_t uint64
Definition: Define.h:141
uint32_t uint32
Definition: Define.h:142
WorldPacket const * Write() override
WorldPacket const * Write() override
BattlenetRpcErrorCode BnetStatus
WorldPacket const * Write() override
@ CMSG_BATTLENET_REQUEST
Definition: Opcodes.h:119
@ CMSG_CHANGE_REALM_TICKET
Definition: Opcodes.h:188
@ SMSG_BATTLENET_RESPONSE
Definition: Opcodes.h:1004
@ SMSG_BATTLENET_NOTIFICATION
Definition: Opcodes.h:1003
@ SMSG_BATTLE_NET_CONNECTION_STATUS
Definition: Opcodes.h:1005
@ SMSG_CHANGE_REALM_TICKET_RESPONSE
Definition: Opcodes.h:1090
STL namespace.