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

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Achievement::EarnedAchievement const &earned)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Achievement::AllAchievements const &allAchievements)
 

Function Documentation

21 {
22  data << uint32(earned.Id);
23  data.AppendPackedTime(earned.Date);
24  data << earned.Owner;
25  data << uint32(earned.VirtualRealmAddress);
26  data << uint32(earned.NativeRealmAddress);
27  return data;
28 }
void AppendPackedTime(time_t time)
Definition: ByteBuffer.h:680
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Achievement::AllAchievements const allAchievements 
)
31 {
32  data << uint32(allAchievements.Earned.size());
33  data << uint32(allAchievements.Progress.size());
34 
35  for (WorldPackets::Achievement::EarnedAchievement const& earned : allAchievements.Earned)
36  data << earned;
37 
38  for (WorldPackets::Achievement::CriteriaProgress const& progress : allAchievements.Progress)
39  {
40  data << uint32(progress.Id);
41  data << uint64(progress.Quantity);
42  data << progress.Player;
43  data.AppendPackedTime(progress.Date);
44  data << uint32(progress.TimeFromStart);
45  data << uint32(progress.TimeFromCreate);
46  data.WriteBits(progress.Flags, 4);
47  data.FlushBits();
48  }
49 
50  return data;
51 }
uint32 TimeFromCreate
Definition: AchievementPackets.h:45
Definition: AchievementPackets.h:37
void FlushBits()
Definition: ByteBuffer.h:150
uint64_t uint64
Definition: g3dmath.h:170
Definition: AchievementPackets.h:28
uint32 Flags
Definition: AchievementPackets.h:42
time_t Date
Definition: AchievementPackets.h:43
uint32 TimeFromStart
Definition: AchievementPackets.h:44
uint64 Quantity
Definition: AchievementPackets.h:40
uint32 Id
Definition: AchievementPackets.h:39
void AppendPackedTime(time_t time)
Definition: ByteBuffer.h:680
uint32_t uint32
Definition: g3dmath.h:168
ObjectGuid Player
Definition: AchievementPackets.h:41
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function: