TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::Social::FriendStatus Class Referencefinal

#include <SocialPackets.h>

Public Member Functions

 FriendStatus ()
 
void Initialize (ObjectGuid const &guid, FriendsResult result, FriendInfo const &friendInfo)
 
WorldPacket constWrite () override
 
- Public Member Functions inherited from WorldPackets::ServerPacket
 ServerPacket (OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
void Read () overridefinal
 
void Clear ()
 
WorldPacket && Move ()
 
OpcodeServer GetOpcode () const
 
- Public Member Functions inherited from WorldPackets::Packet
 Packet (WorldPacket &&worldPacket)
 
virtual ~Packet ()=default
 
 Packet (Packet const &right)=delete
 
Packetoperator= (Packet const &right)=delete
 
WorldPacket constGetRawPacket () const
 
size_t GetSize () const
 
ConnectionType GetConnection () const
 

Public Attributes

uint32 VirtualRealmAddress = 0
 
std::string Notes
 
uint32 ClassID = CLASS_NONE
 
uint8 Status = 0
 
ObjectGuid Guid
 
ObjectGuid WowAccountGuid
 
uint32 Level = 0
 
uint32 AreaID = 0
 
uint8 FriendResult = 0
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Social::FriendStatus::FriendStatus ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:990

Member Function Documentation

void WorldPackets::Social::FriendStatus::Initialize ( ObjectGuid const guid,
FriendsResult  result,
FriendInfo const friendInfo 
)
73 {
75  Notes = friendInfo.Note;
76  ClassID = friendInfo.Class;
77  Status = friendInfo.Status;
78  Guid = guid;
79  WowAccountGuid = friendInfo.WowAccountGuid;
80  Level = friendInfo.Level;
81  AreaID = friendInfo.Area;
82  FriendResult = result;
83 }
uint32 ClassID
Definition: SocialPackets.h:80
uint8 Status
Definition: SocialPackets.h:81
uint32 AreaID
Definition: SocialPackets.h:85
std::string Notes
Definition: SocialPackets.h:79
ObjectGuid WowAccountGuid
Definition: SocialPackets.h:83
ObjectGuid Guid
Definition: SocialPackets.h:82
uint8 FriendResult
Definition: SocialPackets.h:86
uint32 GetVirtualRealmAddress()
Definition: World.cpp:3487
uint32 Level
Definition: SocialPackets.h:84
uint32 VirtualRealmAddress
Definition: SocialPackets.h:78

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WorldPacket const * WorldPackets::Social::FriendStatus::Write ( )
overridevirtual

Implements WorldPackets::Packet.

86 {
88  _worldPacket << Guid;
95  _worldPacket.WriteBits(Notes.length(), 10);
98 
99  return &_worldPacket;
100 }
uint32 ClassID
Definition: SocialPackets.h:80
uint8 Status
Definition: SocialPackets.h:81
uint32 AreaID
Definition: SocialPackets.h:85
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
std::string Notes
Definition: SocialPackets.h:79
ObjectGuid WowAccountGuid
Definition: SocialPackets.h:83
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
ObjectGuid Guid
Definition: SocialPackets.h:82
uint8 FriendResult
Definition: SocialPackets.h:86
uint8_t uint8
Definition: g3dmath.h:164
uint32 Level
Definition: SocialPackets.h:84
uint32 VirtualRealmAddress
Definition: SocialPackets.h:78
uint32_t uint32
Definition: g3dmath.h:168
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the caller graph for this function:

Member Data Documentation

uint32 WorldPackets::Social::FriendStatus::AreaID = 0
uint32 WorldPackets::Social::FriendStatus::ClassID = CLASS_NONE
uint8 WorldPackets::Social::FriendStatus::FriendResult = 0
See also
enum FriendsResult
ObjectGuid WorldPackets::Social::FriendStatus::Guid
uint32 WorldPackets::Social::FriendStatus::Level = 0
std::string WorldPackets::Social::FriendStatus::Notes
uint8 WorldPackets::Social::FriendStatus::Status = 0
See also
enum FriendStatus
uint32 WorldPackets::Social::FriendStatus::VirtualRealmAddress = 0
ObjectGuid WorldPackets::Social::FriendStatus::WowAccountGuid

The documentation for this class was generated from the following files: