TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PetitionPackets.cpp File Reference
#include "PetitionPackets.h"
+ Include dependency graph for PetitionPackets.cpp:

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: