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

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Calendar::CalendarSendCalendarEventInfo const &eventInfo)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Calendar::CalendarSendCalendarRaidResetInfo const &resetInfo)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Calendar::CalendarSendCalendarRaidLockoutInfo const &lockoutInfo)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Calendar::CalendarSendCalendarInviteInfo const &inviteInfo)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Calendar::CalendarEventInviteInfo const &inviteInfo)
 
ByteBufferoperator>> (ByteBuffer &buffer, WorldPackets::Calendar::CalendarAddEventInviteInfo &invite)
 
ByteBufferoperator>> (ByteBuffer &buffer, WorldPackets::Calendar::CalendarAddEventInfo &addEventInfo)
 

Function Documentation

22 {
23  data << uint64(eventInfo.EventID);
24  data << uint8(eventInfo.EventType);
25  data.AppendPackedTime(eventInfo.Date);
26  data << uint32(eventInfo.Flags);
27  data << int32(eventInfo.TextureID);
28  data << eventInfo.EventGuildID;
29  data << eventInfo.OwnerGuid;
30 
31  data.WriteBits(eventInfo.EventName.size(), 8);
32  data.FlushBits();
33  data.WriteString(eventInfo.EventName);
34 
35  return data;
36 }
void FlushBits()
Definition: ByteBuffer.h:150
uint64_t uint64
Definition: g3dmath.h:170
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
void AppendPackedTime(time_t time)
Definition: ByteBuffer.h:680
uint8_t uint8
Definition: g3dmath.h:164
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function:

39 {
40  data << int32(resetInfo.MapID);
41  data << uint32(resetInfo.Duration);
42  data << int32(resetInfo.Offset);
43 
44  return data;
45 }
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
48 {
49  data << uint64(lockoutInfo.InstanceID);
50  data << int32(lockoutInfo.MapID);
51  data << uint32(lockoutInfo.DifficultyID);
52  data << uint32(lockoutInfo.ExpireTime);
53 
54  return data;
55 }
uint64_t uint64
Definition: g3dmath.h:170
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
58 {
59  data << uint64(inviteInfo.EventID);
60  data << uint64(inviteInfo.InviteID);
61  data << uint8(inviteInfo.Status);
62  data << uint8(inviteInfo.Moderator);
63  data << uint8(inviteInfo.InviteType);
64  data << inviteInfo.InviterGuid;
65 
66  return data;
67 }
uint64_t uint64
Definition: g3dmath.h:170
uint8_t uint8
Definition: g3dmath.h:164
ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Calendar::CalendarEventInviteInfo const inviteInfo 
)
70 {
71  data << inviteInfo.Guid;
72  data << uint64(inviteInfo.InviteID);
73 
74  data << uint8(inviteInfo.Level);
75  data << uint8(inviteInfo.Status);
76  data << uint8(inviteInfo.Moderator);
77  data << uint8(inviteInfo.InviteType);
78 
79  data.AppendPackedTime(inviteInfo.ResponseTime);
80 
81  data.WriteBits(inviteInfo.Notes.size(), 8);
82  data.FlushBits();
83  data.WriteString(inviteInfo.Notes);
84 
85  return data;
86 }
void FlushBits()
Definition: ByteBuffer.h:150
uint64_t uint64
Definition: g3dmath.h:170
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
void AppendPackedTime(time_t time)
Definition: ByteBuffer.h:680
uint8_t uint8
Definition: g3dmath.h:164
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function:

101 {
102  buffer >> invite.Guid;
103  buffer >> invite.Status;
104  buffer >> invite.Moderator;
105  return buffer;
106 }
uint8 Status
Definition: CalendarPackets.h:63
uint8 Moderator
Definition: CalendarPackets.h:64
ObjectGuid Guid
Definition: CalendarPackets.h:62
ByteBuffer& operator>> ( ByteBuffer buffer,
WorldPackets::Calendar::CalendarAddEventInfo addEventInfo 
)
109 {
110  uint8 titleLength = buffer.ReadBits(8);
111  uint16 descriptionLength = buffer.ReadBits(11);
112 
113  buffer >> addEventInfo.EventType;
114  buffer >> addEventInfo.TextureID;
115  addEventInfo.Time = buffer.ReadPackedTime();
116  buffer >> addEventInfo.Flags;
117  addEventInfo.Invites.resize(buffer.read<uint32>());
118 
119  addEventInfo.Title = buffer.ReadString(titleLength);
120  addEventInfo.Description = buffer.ReadString(descriptionLength);
121 
123  buffer >> invite;
124 
125  return buffer;
126 }
uint32 ReadBits(int32 bits)
Definition: ByteBuffer.h:204
uint8 EventType
Definition: CalendarPackets.h:71
Array< CalendarAddEventInviteInfo, CALENDAR_MAX_INVITES > Invites
Definition: CalendarPackets.h:75
uint32 ReadPackedTime()
Definition: ByteBuffer.h:552
std::string ReadString(uint32 length)
Definition: ByteBuffer.h:524
std::string Description
Definition: CalendarPackets.h:70
uint32_t uint32
Definition: Define.h:150
uint16_t uint16
Definition: Define.h:151
int32 TextureID
Definition: CalendarPackets.h:72
uint32 Flags
Definition: CalendarPackets.h:74
uint8_t uint8
Definition: Define.h:152
time_t Time
Definition: CalendarPackets.h:73
T read()
Definition: ByteBuffer.h:484
std::string Title
Definition: CalendarPackets.h:69

+ Here is the call graph for this function: