TrinityCore
PetitionPackets.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 PetitionPackets_h__
19#define PetitionPackets_h__
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23
24namespace WorldPackets
25{
26 namespace Petition
27 {
28 class QueryPetition final : public ClientPacket
29 {
30 public:
32
33 void Read() override;
34
37 };
38
40 {
43 std::string Title;
44 std::string BodyText;
58 std::array<std::string, 10> Choicetext;
59 };
60
62 {
63 public:
65
66 WorldPacket const* Write() override;
67
69 bool Allow = false;
71 };
72
73 class PetitionShowList final : public ClientPacket
74 {
75 public:
77
78 void Read() override;
79
81 };
82
84 {
85 public:
87
88 WorldPacket const* Write() override;
89
92 };
93
94 class PetitionBuy final : public ClientPacket
95 {
96 public:
98
99 void Read() override;
100
102 std::string Title;
104 };
105
107 {
108 public:
110
111 void Read() override;
112
114 };
115
117 {
118 public:
120 {
123 };
124
126
127 WorldPacket const* Write() override;
128
133 std::vector<PetitionSignature> Signatures;
134 };
135
136 class SignPetition final : public ClientPacket
137 {
138 public:
140
141 void Read() override;
142
145 };
146
148 {
149 public:
151
152 WorldPacket const* Write() override;
153
156 int32 Error = 0; // PetitionError
157 };
158
160 {
161 public:
163
164 WorldPacket const* Write() override;
165
167 };
168
169 class DeclinePetition final : public ClientPacket
170 {
171 public:
173
174 void Read() override;
175
177 };
178
179 class TurnInPetition final : public ClientPacket
180 {
181 public:
183
184 void Read() override;
185
187 };
188
190 {
191 public:
193
194 WorldPacket const* Write() override;
195
196 int32 Result = 0; // PetitionError
197 };
198
199 class OfferPetition final : public ClientPacket
200 {
201 public:
203
204 void Read() override;
205
208 };
209
210 class OfferPetitionError final : public ServerPacket
211 {
212 public:
214
215 WorldPacket const* Write() override;
216
218 };
219
221 {
222 public:
224
225 void Read() override;
226
228 std::string NewGuildName;
229 };
230
232 {
233 public:
235
236 WorldPacket const* Write() override;
237
239 std::string NewGuildName;
240 };
241 }
242}
243
245
246#endif // PetitionPackets_h__
uint8_t uint8
Definition: Define.h:144
int16_t int16
Definition: Define.h:139
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
ByteBuffer & operator<<(ByteBuffer &data, WorldPackets::Petition::PetitionInfo const &petitionInfo)
WorldPacket const * Write() override
@ CMSG_TURN_IN_PETITION
Definition: Opcodes.h:861
@ CMSG_SIGN_PETITION
Definition: Opcodes.h:808
@ CMSG_DECLINE_PETITION
Definition: Opcodes.h:310
@ CMSG_OFFER_PETITION
Definition: Opcodes.h:594
@ CMSG_PETITION_SHOW_SIGNATURES
Definition: Opcodes.h:614
@ CMSG_QUERY_PETITION
Definition: Opcodes.h:649
@ CMSG_PETITION_RENAME_GUILD
Definition: Opcodes.h:612
@ CMSG_PETITION_SHOW_LIST
Definition: Opcodes.h:613
@ CMSG_PETITION_BUY
Definition: Opcodes.h:611
@ SMSG_PETITION_SHOW_LIST
Definition: Opcodes.h:1691
@ SMSG_PETITION_SHOW_SIGNATURES
Definition: Opcodes.h:1692
@ SMSG_QUERY_PETITION_RESPONSE
Definition: Opcodes.h:1783
@ SMSG_OFFER_PETITION_ERROR
Definition: Opcodes.h:1665
@ SMSG_PETITION_SIGN_RESULTS
Definition: Opcodes.h:1693
@ SMSG_PETITION_ALREADY_SIGNED
Definition: Opcodes.h:1689
@ SMSG_PETITION_RENAME_GUILD_RESPONSE
Definition: Opcodes.h:1690
@ SMSG_TURN_IN_PETITION_RESULT
Definition: Opcodes.h:2015
STL namespace.
std::array< std::string, 10 > Choicetext