TrinityCore
ChannelPackets.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 ChannelPackets_h__
19#define ChannelPackets_h__
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23
24namespace WorldPackets
25{
26 namespace Channel
27 {
28 class ChannelListResponse final : public ServerPacket
29 {
30 public:
32 {
33 ChannelPlayer(ObjectGuid const& guid, uint32 virtualRealmAddress, uint8 flags) :
34 Guid(guid), VirtualRealmAddress(virtualRealmAddress), Flags(flags) { }
35
39 };
40
42
43 WorldPacket const* Write() override;
44
45 std::vector<ChannelPlayer> _Members;
46 std::string _Channel;
48 bool _Display = false;
49 };
50
52 {
53 public:
55
56 WorldPacket const* Write() override;
57
58 std::string Sender;
61 uint8 Type = 0;
62 uint8 OldFlags = 0;
63 uint8 NewFlags = 0;
64 std::string _Channel;
65 uint32 SenderVirtualRealm = 0;
67 uint32 TargetVirtualRealm = 0;
68 int32 ChatChannelID = 0;
69 };
70
71 class ChannelNotifyJoined final : public ServerPacket
72 {
73 public:
75
76 WorldPacket const* Write() override;
77
78 std::string ChannelWelcomeMsg;
82 std::string _Channel;
84 };
85
86 class ChannelNotifyLeft final : public ServerPacket
87 {
88 public:
90
91 WorldPacket const* Write() override;
92
93 std::string Channel;
95 bool Suspended = false;
96 };
97
98 class UserlistAdd final : public ServerPacket
99 {
100 public:
102
103 WorldPacket const* Write() override;
104
109 std::string ChannelName;
110 };
111
112 class UserlistRemove final : public ServerPacket
113 {
114 public:
116
117 WorldPacket const* Write() override;
118
122 std::string ChannelName;
123 };
124
125 class UserlistUpdate final : public ServerPacket
126 {
127 public:
129
130 WorldPacket const* Write() override;
131
136 std::string ChannelName;
137 };
138
139 class ChannelCommand final : public ClientPacket
140 {
141 public:
142 ChannelCommand(WorldPacket&& packet);
143
144 void Read() override;
145
146 std::string ChannelName;
147 };
148
150 {
151 public:
153
154 void Read() override;
155
156 std::string ChannelName;
157 std::string Name;
158 };
159
160 class ChannelPassword final : public ClientPacket
161 {
162 public:
164
165 void Read() override;
166
167 std::string ChannelName;
168 std::string Password;
169 };
170
171 class JoinChannel final : public ClientPacket
172 {
173 public:
175
176 void Read() override;
177
178 std::string Password;
179 std::string ChannelName;
180 bool CreateVoiceSession = false;
182 bool Internal = false;
183 };
184
185 class LeaveChannel final : public ClientPacket
186 {
187 public:
189
190 void Read() override;
191
193 std::string ChannelName;
194 };
195 }
196}
197
198#endif // ChannelPackets_h__
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint64_t uint64
Definition: Define.h:141
uint32_t uint32
Definition: Define.h:142
uint16 flags
Definition: DisableMgr.cpp:49
std::vector< ChannelPlayer > _Members
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
bool Suspended
User Leave - false, On Zone Change - true.
std::string _Channel
Channel Name.
JoinChannel(WorldPacket &&packet)
LeaveChannel(WorldPacket &&packet)
WorldPacket const * Write() override
WorldPacket const * Write() override
WorldPacket const * Write() override
@ CMSG_CHAT_CHANNEL_PASSWORD
Definition: Opcodes.h:209
@ CMSG_CHAT_LEAVE_CHANNEL
Definition: Opcodes.h:216
@ CMSG_CHAT_JOIN_CHANNEL
Definition: Opcodes.h:215
@ SMSG_CHANNEL_LIST
Definition: Opcodes.h:1091
@ SMSG_USERLIST_REMOVE
Definition: Opcodes.h:2043
@ SMSG_CHANNEL_NOTIFY
Definition: Opcodes.h:1092
@ SMSG_USERLIST_UPDATE
Definition: Opcodes.h:2044
@ SMSG_CHANNEL_NOTIFY_JOINED
Definition: Opcodes.h:1093
@ SMSG_USERLIST_ADD
Definition: Opcodes.h:2042
@ SMSG_CHANNEL_NOTIFY_LEFT
Definition: Opcodes.h:1094
STL namespace.
ChannelPlayer(ObjectGuid const &guid, uint32 virtualRealmAddress, uint8 flags)