TrinityCore
Loading...
Searching...
No Matches
SocialPackets.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_SOCIAL_PACKETS_H
19#define TRINITYCORE_SOCIAL_PACKETS_H
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23#include "SharedDefines.h"
24
25struct FriendInfo;
26enum FriendsResult : uint8;
27
28namespace WorldPackets
29{
30 namespace Social
31 {
32 class SendContactList final : public ClientPacket
33 {
34 public:
35 explicit SendContactList(WorldPacket&& packet) : ClientPacket(CMSG_SEND_CONTACT_LIST, std::move(packet)) { }
36
37 void Read() override;
38
40 };
41
55
56 class ContactList final : public ServerPacket
57 {
58 public:
60
61 WorldPacket const* Write() override;
62
63 std::vector<ContactInfo> Contacts;
65 };
66
84
90
91 class AddFriend final : public ClientPacket
92 {
93 public:
94 explicit AddFriend(WorldPacket&& packet) : ClientPacket(CMSG_ADD_FRIEND, std::move(packet)) { }
95
96 void Read() override;
97
98 std::string Notes;
99 std::string Name;
100 };
101
102 class DelFriend final : public ClientPacket
103 {
104 public:
105 explicit DelFriend(WorldPacket&& packet) : ClientPacket(CMSG_DEL_FRIEND, std::move(packet)) { }
106
107 void Read() override;
108
110 };
111
112 class SetContactNotes final : public ClientPacket
113 {
114 public:
115 explicit SetContactNotes(WorldPacket&& packet) : ClientPacket(CMSG_SET_CONTACT_NOTES, std::move(packet)) { }
116
117 void Read() override;
118
120 std::string Notes;
121 };
122
123 class AddIgnore final : public ClientPacket
124 {
125 public:
126 explicit AddIgnore(WorldPacket&& packet) : ClientPacket(CMSG_ADD_IGNORE, std::move(packet)) { }
127
128 void Read() override;
129
130 std::string Name;
132 };
133
134 class DelIgnore final : public ClientPacket
135 {
136 public:
137 explicit DelIgnore(WorldPacket&& packet) : ClientPacket(CMSG_DEL_IGNORE, std::move(packet)) { }
138
139 void Read() override;
140
142 };
143
145 {
146 public:
148
149 void Read() override { }
150 };
151
153 {
154 public:
156
157 WorldPacket const* Write() override;
158
159 bool ShowSocialContract = false;
160 };
161 }
162}
163
164#endif // TRINITYCORE_SOCIAL_PACKETS_H
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
uint32_t uint32
Definition Define.h:154
@ SMSG_SOCIAL_CONTRACT_REQUEST_RESPONSE
Definition Opcodes.h:2310
@ SMSG_CONTACT_LIST
Definition Opcodes.h:1370
@ SMSG_FRIEND_STATUS
Definition Opcodes.h:1465
@ CMSG_SEND_CONTACT_LIST
Definition Opcodes.h:889
@ CMSG_SET_CONTACT_NOTES
Definition Opcodes.h:906
@ CMSG_SOCIAL_CONTRACT_REQUEST
Definition Opcodes.h:947
@ CMSG_DEL_IGNORE
Definition Opcodes.h:320
@ CMSG_ADD_IGNORE
Definition Opcodes.h:54
@ CMSG_DEL_FRIEND
Definition Opcodes.h:319
@ CMSG_ADD_FRIEND
Definition Opcodes.h:53
@ CLASS_NONE
FriendsResult
Results of friend related commands.
Definition SocialMgr.h:68
AddFriend(WorldPacket &&packet)
AddIgnore(WorldPacket &&packet)
WorldPacket const * Write() override
std::vector< ContactInfo > Contacts
DelFriend(WorldPacket &&packet)
DelIgnore(WorldPacket &&packet)
WorldPacket const * Write() override
SendContactList(WorldPacket &&packet)
STL namespace.