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

Go to the source code of this file.

Classes

struct  WorldPackets::Mail::MailAttachedItemEnchant
 
struct  WorldPackets::Mail::MailAttachedItem
 
struct  WorldPackets::Mail::MailListEntry
 
class  WorldPackets::Mail::MailGetList
 
class  WorldPackets::Mail::MailListResult
 
class  WorldPackets::Mail::MailCreateTextItem
 
class  WorldPackets::Mail::SendMail
 
struct  WorldPackets::Mail::SendMail::StructSendMail
 
struct  WorldPackets::Mail::SendMail::StructSendMail::MailAttachment
 
class  WorldPackets::Mail::MailCommandResult
 
class  WorldPackets::Mail::MailReturnToSender
 
class  WorldPackets::Mail::MailMarkAsRead
 
class  WorldPackets::Mail::MailDelete
 
class  WorldPackets::Mail::MailTakeItem
 
class  WorldPackets::Mail::MailTakeMoney
 
class  WorldPackets::Mail::MailQueryNextMailTime
 
class  WorldPackets::Mail::MailQueryNextTimeResult
 
struct  WorldPackets::Mail::MailQueryNextTimeResult::MailNextTimeEntry
 
class  WorldPackets::Mail::NotifyRecievedMail
 
class  WorldPackets::Mail::ShowMailbox
 

Namespaces

 WorldPackets
 
 WorldPackets::Mail
 

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Mail::MailAttachedItem const &att)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Mail::MailListEntry const &entry)
 

Function Documentation

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Mail::MailAttachedItem const att 
)
43 {
44  data << uint8(att.Position);
45  data << uint32(att.AttachID);
46  data << att.Item;
47 
48  for (auto const& en : att.Enchants)
49  {
50  data << int32(en.Enchant);
51  data << int32(en.Duration);
52  data << int32(en.Charges);
53  }
54 
55  data << int32(att.Count);
56  data << int32(att.Charges);
57  data << int32(att.MaxDurability);
58  data << int32(att.Durability);
59  data.WriteBit(att.Unlocked);
60  data.FlushBits();
61 
62  return data;
63 }
void FlushBits()
Definition: ByteBuffer.h:150
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
uint8_t uint8
Definition: g3dmath.h:164
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Mail::MailListEntry const entry 
)
100 {
101  data << int32(entry.MailID);
102  data << int8(entry.SenderType);
103 
104  data << int64(entry.Cod);
105  data << int32(entry.StationeryID);
106  data << int64(entry.SentMoney);
107  data << int32(entry.Flags);
108  data << float(entry.DaysLeft);
109  data << int32(entry.MailTemplateID);
110 
111  data << int32(entry.Attachments.size());
112 
113  for (auto const& att : entry.Attachments)
114  data << att;
115 
116  data.WriteBit(entry.SenderCharacter.is_initialized());
117  data.WriteBit(entry.AltSenderID.is_initialized());
118 
119  data.WriteBits(entry.Subject.size(), 8);
120  data.WriteBits(entry.Body.size(), 13);
121  data.FlushBits();
122 
123  if (entry.SenderCharacter)
124  data << *entry.SenderCharacter;
125 
126  if (entry.AltSenderID)
127  data << int32(*entry.AltSenderID);
128 
129  data.WriteString(entry.Subject);
130  data.WriteString(entry.Body);
131 
132  return data;
133 }
int8_t int8
Definition: g3dmath.h:163
void FlushBits()
Definition: ByteBuffer.h:150
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
int64_t int64
Definition: g3dmath.h:169
int32_t int32
Definition: g3dmath.h:167
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function: