TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PetitionPackets.h File Reference
#include "Packet.h"
#include "ObjectGuid.h"
#include "WorldSession.h"
+ Include dependency graph for PetitionPackets.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  WorldPackets::Petition::QueryPetition
 
struct  WorldPackets::Petition::PetitionInfo
 
class  WorldPackets::Petition::QueryPetitionResponse
 
class  WorldPackets::Petition::PetitionShowList
 
class  WorldPackets::Petition::ServerPetitionShowList
 
class  WorldPackets::Petition::PetitionBuy
 
class  WorldPackets::Petition::PetitionShowSignatures
 
class  WorldPackets::Petition::ServerPetitionShowSignatures
 
struct  WorldPackets::Petition::ServerPetitionShowSignatures::PetitionSignature
 
class  WorldPackets::Petition::SignPetition
 
class  WorldPackets::Petition::PetitionSignResults
 
class  WorldPackets::Petition::PetitionAlreadySigned
 
class  WorldPackets::Petition::DeclinePetition
 
class  WorldPackets::Petition::TurnInPetition
 
class  WorldPackets::Petition::TurnInPetitionResult
 
class  WorldPackets::Petition::OfferPetition
 
class  WorldPackets::Petition::OfferPetitionError
 
class  WorldPackets::Petition::PetitionRenameGuild
 
class  WorldPackets::Petition::PetitionRenameGuildResponse
 

Namespaces

 WorldPackets
 
 WorldPackets::Petition
 

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Petition::PetitionInfo const &petitionInfo)
 

Function Documentation

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Petition::PetitionInfo const petitionInfo 
)
27 {
28  data << petitionInfo.PetitionID;
29  data << petitionInfo.Petitioner;
30 
31  data << petitionInfo.MinSignatures;
32  data << petitionInfo.MaxSignatures;
33  data << petitionInfo.DeadLine;
34  data << petitionInfo.IssueDate;
35  data << petitionInfo.AllowedGuildID;
36  data << petitionInfo.AllowedClasses;
37  data << petitionInfo.AllowedRaces;
38  data << petitionInfo.AllowedGender;
39  data << petitionInfo.AllowedMinLevel;
40  data << petitionInfo.AllowedMaxLevel;
41  data << petitionInfo.NumChoices;
42  data << petitionInfo.StaticType;
43  data << petitionInfo.Muid;
44 
45  data.WriteBits(petitionInfo.Title.length(), 7);
46  data.WriteBits(petitionInfo.BodyText.length(), 12);
47 
48  for (uint8 i = 0; i < 10; i++)
49  data.WriteBits(petitionInfo.Choicetext[i].length(), 6);
50 
51  data.FlushBits();
52 
53  for (uint8 i = 0; i < 10; i++)
54  data.WriteString(petitionInfo.Choicetext[i]);
55 
56  data.WriteString(petitionInfo.Title);
57  data.WriteString(petitionInfo.BodyText);
58 
59  return data;
60 }
void FlushBits()
Definition: ByteBuffer.h:150
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
uint8_t uint8
Definition: Define.h:152
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function: