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

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Guild::GuildRosterProfessionData const &rosterProfessionData)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Guild::GuildRosterMemberData const &rosterMemberData)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Guild::GuildRankData const &rankData)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Guild::GuildRewardItem const &rewardItem)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Guild::GuildNewsEvent const &newsEvent)
 

Function Documentation

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Guild::GuildRosterProfessionData const rosterProfessionData 
)
153 {
154  data << rosterProfessionData.DbID;
155  data << rosterProfessionData.Rank;
156  data << rosterProfessionData.Step;
157 
158  return data;
159 }
ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Guild::GuildRosterMemberData const rosterMemberData 
)
162 {
163  data << rosterMemberData.Guid;
164  data << rosterMemberData.RankID;
165  data << rosterMemberData.AreaID;
166  data << rosterMemberData.PersonalAchievementPoints;
167  data << rosterMemberData.GuildReputation;
168  data << rosterMemberData.LastSave;
169 
170  for (uint8 i = 0; i < 2; i++)
171  data << rosterMemberData.Profession[i];
172 
173  data << rosterMemberData.VirtualRealmAddress;
174  data << rosterMemberData.Status;
175  data << rosterMemberData.Level;
176  data << rosterMemberData.ClassID;
177  data << rosterMemberData.Gender;
178 
179  data.WriteBits(rosterMemberData.Name.length(), 6);
180  data.WriteBits(rosterMemberData.Note.length(), 8);
181  data.WriteBits(rosterMemberData.OfficerNote.length(), 8);
182  data.WriteBit(rosterMemberData.Authenticated);
183  data.WriteBit(rosterMemberData.SorEligible);
184  data.FlushBits();
185 
186  data.WriteString(rosterMemberData.Name);
187  data.WriteString(rosterMemberData.Note);
188  data.WriteString(rosterMemberData.OfficerNote);
189 
190  return data;
191 }
void FlushBits()
Definition: ByteBuffer.h:150
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
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:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Guild::GuildRankData const rankData 
)
363 {
364  data << rankData.RankID;
365  data << rankData.RankOrder;
366  data << rankData.Flags;
367  data << rankData.WithdrawGoldLimit;
368 
369  for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; i++)
370  {
371  data << rankData.TabFlags[i];
372  data << rankData.TabWithdrawItemLimit[i];
373  }
374 
375  data.WriteBits(rankData.RankName.length(), 7);
376  data.FlushBits();
377 
378  data.WriteString(rankData.RankName);
379 
380  return data;
381 }
void FlushBits()
Definition: ByteBuffer.h:150
Definition: Guild.h:44
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:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Guild::GuildRewardItem const rewardItem 
)
513 {
514  data << rewardItem.ItemID;
515  data << rewardItem.Unk4;
516  data << uint32(rewardItem.AchievementsRequired.size());
517  data << rewardItem.RaceMask;
518  data << rewardItem.MinGuildLevel;
519  data << rewardItem.MinGuildRep;
520  data << rewardItem.Cost;
521 
522  for (uint8 i = 0; i < rewardItem.AchievementsRequired.size(); i++)
523  data << rewardItem.AchievementsRequired[i];
524 
525  return data;
526 }
uint8_t uint8
Definition: Define.h:152
uint32_t uint32
Definition: g3dmath.h:168
ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Guild::GuildNewsEvent const newsEvent 
)
739 {
740  data << newsEvent.Id;
741  data.AppendPackedTime(newsEvent.CompletedDate);
742  data << newsEvent.Type;
743  data << newsEvent.Flags;
744 
745  for (uint8 i = 0; i < 2; i++)
746  data << newsEvent.Data[i];
747 
748  data << newsEvent.MemberGuid;
749  data << uint32(newsEvent.MemberList.size());
750 
751  for (ObjectGuid memberGuid : newsEvent.MemberList)
752  data << memberGuid;
753 
754  data.WriteBit(newsEvent.Item.is_initialized());
755  data.FlushBits();
756 
757  if (newsEvent.Item)
758  data << *newsEvent.Item; // WorldPackets::Item::ItemInstance
759 
760  return data;
761 }
void FlushBits()
Definition: ByteBuffer.h:150
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
uint32_t uint32
Definition: Define.h:150
void AppendPackedTime(time_t time)
Definition: ByteBuffer.h:680
uint8_t uint8
Definition: Define.h:152
Definition: ObjectGuid.h:189

+ Here is the call graph for this function: