TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PetitionPackets.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
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 #include "WorldSession.h"
24 
25 namespace WorldPackets
26 {
27  namespace Petition
28  {
29  class QueryPetition final : public ClientPacket
30  {
31  public:
33 
34  void Read() override;
35 
38  };
39 
40  struct PetitionInfo
41  {
44  std::string Title;
45  std::string BodyText;
58  uint32 Muid = 0;
59  std::string Choicetext[10];
60  };
61 
62  class QueryPetitionResponse final : public ServerPacket
63  {
64  public:
66 
67  WorldPacket const* Write() override;
68 
70  bool Allow = false;
72  };
73 
74  class PetitionShowList final : public ClientPacket
75  {
76  public:
78 
79  void Read() override;
80 
82  };
83 
84  class ServerPetitionShowList final : public ServerPacket
85  {
86  public:
88 
89  WorldPacket const* Write() override;
90 
93  };
94 
95  class PetitionBuy final : public ClientPacket
96  {
97  public:
98  PetitionBuy(WorldPacket&& packet) : ClientPacket(CMSG_PETITION_BUY, std::move(packet)) { }
99 
100  void Read() override;
101 
103  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 
147  class PetitionSignResults final : public ServerPacket
148  {
149  public:
151 
152  WorldPacket const* Write() override;
153 
156  int32 Error = 0; // PetitionError
157  };
158 
159  class PetitionAlreadySigned final : public ServerPacket
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 
189  class TurnInPetitionResult final : public ServerPacket
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 
220  class PetitionRenameGuild final : public ClientPacket
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__
Definition: PetitionPackets.h:40
PetitionShowSignatures(WorldPacket &&packet)
Definition: PetitionPackets.h:109
QueryPetition(WorldPacket &&packet)
Definition: PetitionPackets.h:32
void Read() override
Definition: PetitionPackets.cpp:159
PetitionInfo Info
Definition: PetitionPackets.h:71
Definition: PetitionPackets.h:62
uint32 PetitionID
Definition: PetitionPackets.h:37
uint8 Choice
Definition: PetitionPackets.h:144
Definition: ByteBuffer.h:70
Definition: PetitionPackets.h:95
uint32 PetitionID
Definition: PetitionPackets.h:69
QueryPetitionResponse()
Definition: PetitionPackets.h:65
Definition: Opcodes.h:647
Definition: PetitionPackets.h:220
Definition: Opcodes.h:1331
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:100
Definition: Opcodes.h:235
void Read() override
Definition: PetitionPackets.cpp:20
Definition: Opcodes.h:489
Definition: PetitionPackets.h:210
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:62
PetitionBuy(WorldPacket &&packet)
Definition: PetitionPackets.h:98
OfferPetition(WorldPacket &&packet)
Definition: PetitionPackets.h:202
Definition: PetitionPackets.h:159
void Read() override
Definition: PetitionPackets.cpp:95
int16 AllowedGender
Definition: PetitionPackets.h:53
STL namespace.
ObjectGuid Owner
Definition: PetitionPackets.h:130
Definition: PetitionPackets.h:147
std::vector< PetitionSignature > Signatures
Definition: PetitionPackets.h:133
std::string Title
Definition: PetitionPackets.h:44
PetitionShowList(WorldPacket &&packet)
Definition: PetitionPackets.h:77
int32 DeadLine
Definition: PetitionPackets.h:48
Definition: PetitionPackets.h:189
Definition: Opcodes.h:1312
OfferPetitionError()
Definition: PetitionPackets.h:213
Definition: PetitionPackets.h:106
ObjectGuid ItemGUID
Definition: PetitionPackets.h:207
Definition: PetitionPackets.h:169
int32 IssueDate
Definition: PetitionPackets.h:49
int32 AllowedMinLevel
Definition: PetitionPackets.h:54
Definition: PetitionPackets.h:29
std::string NewGuildName
Definition: PetitionPackets.h:239
Definition: Opcodes.h:1587
uint32 Price
Definition: PetitionPackets.h:92
int32 PetitionID
Definition: PetitionPackets.h:132
std::string Choicetext[10]
Definition: PetitionPackets.h:59
TurnInPetition(WorldPacket &&packet)
Definition: PetitionPackets.h:182
int32 MaxSignatures
Definition: PetitionPackets.h:47
Definition: Packet.h:59
int32 AllowedClasses
Definition: PetitionPackets.h:51
ObjectGuid TargetPlayer
Definition: PetitionPackets.h:206
ObjectGuid Item
Definition: PetitionPackets.h:186
ObjectGuid Player
Definition: PetitionPackets.h:155
Definition: PetitionPackets.h:136
int32 AllowedGuildID
Definition: PetitionPackets.h:50
Definition: PetitionPackets.h:179
std::string NewGuildName
Definition: PetitionPackets.h:228
Definition: Opcodes.h:1329
PetitionSignResults()
Definition: PetitionPackets.h:150
Definition: Packet.h:46
Definition: Opcodes.h:1330
ObjectGuid PlayerGUID
Definition: PetitionPackets.h:217
void Read() override
Definition: PetitionPackets.cpp:141
int32_t int32
Definition: Define.h:146
PetitionRenameGuild(WorldPacket &&packet)
Definition: PetitionPackets.h:223
PetitionAlreadySigned()
Definition: PetitionPackets.h:162
ObjectGuid Unit
Definition: PetitionPackets.h:91
void Read() override
Definition: PetitionPackets.cpp:87
uint32_t uint32
Definition: Define.h:150
Definition: Opcodes.h:686
SignPetition(WorldPacket &&packet)
Definition: PetitionPackets.h:139
ObjectGuid Petitioner
Definition: PetitionPackets.h:43
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:134
Definition: Opcodes.h:1328
ObjectGuid PetitionUnit
Definition: PetitionPackets.h:81
ObjectGuid Unit
Definition: PetitionPackets.h:102
ObjectGuid PetitionGUID
Definition: PetitionPackets.h:176
ObjectGuid OwnerAccountID
Definition: PetitionPackets.h:131
int32 MinSignatures
Definition: PetitionPackets.h:46
std::string BodyText
Definition: PetitionPackets.h:45
ServerPetitionShowSignatures()
Definition: PetitionPackets.h:125
ObjectGuid PetitionGUID
Definition: PetitionPackets.h:143
DeclinePetition(WorldPacket &&packet)
Definition: PetitionPackets.h:172
Definition: BattlegroundMgr.h:57
bool Allow
Definition: PetitionPackets.h:70
int32 PetitionID
Definition: PetitionPackets.h:42
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:151
Definition: PetitionPackets.h:84
ObjectGuid Item
Definition: PetitionPackets.h:129
std::string Title
Definition: PetitionPackets.h:103
Definition: Opcodes.h:1332
int32 Error
Definition: PetitionPackets.h:156
ObjectGuid PetitionGuid
Definition: PetitionPackets.h:238
int32 StaticType
Definition: PetitionPackets.h:57
ObjectGuid ItemGUID
Definition: PetitionPackets.h:36
ServerPetitionShowList()
Definition: PetitionPackets.h:87
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:182
int32 NumChoices
Definition: PetitionPackets.h:56
int32 AllowedMaxLevel
Definition: PetitionPackets.h:55
uint8_t uint8
Definition: Define.h:152
Definition: PetitionPackets.h:74
uint32 Muid
Definition: PetitionPackets.h:58
Definition: Opcodes.h:1399
Definition: Opcodes.h:477
Definition: Opcodes.h:525
int32 AllowedRaces
Definition: PetitionPackets.h:52
int16_t int16
Definition: Define.h:147
Definition: ObjectGuid.h:189
void Read() override
Definition: PetitionPackets.cpp:172
void Read() override
Definition: PetitionPackets.cpp:146
Definition: Opcodes.h:490
ObjectGuid Item
Definition: PetitionPackets.h:154
void Read() override
Definition: PetitionPackets.cpp:74
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:79
ObjectGuid Item
Definition: PetitionPackets.h:113
ObjectGuid PetitionGuid
Definition: PetitionPackets.h:227
Definition: PetitionPackets.h:199
ByteBuffer & operator<<(ByteBuffer &data, WorldPackets::Petition::PetitionInfo const &petitionInfo)
Definition: PetitionPackets.cpp:26
Definition: WorldPacket.h:26
TurnInPetitionResult()
Definition: PetitionPackets.h:192
int32 Result
Definition: PetitionPackets.h:196
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:123
void Read() override
Definition: PetitionPackets.cpp:117
Definition: Opcodes.h:487
PetitionRenameGuildResponse()
Definition: PetitionPackets.h:234
ObjectGuid SignerGUID
Definition: PetitionPackets.h:166
WorldPacket const * Write() override
Definition: PetitionPackets.cpp:165
Definition: Opcodes.h:488