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

#include <MiscPackets.h>

Public Member Functions

 LoadCUFProfiles ()
 
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

std::vector< CUFProfile const * > CUFProfiles
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Misc::LoadCUFProfiles::LoadCUFProfiles ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1189

Member Function Documentation

WorldPacket const * WorldPackets::Misc::LoadCUFProfiles::Write ( )
overridevirtual

Implements WorldPackets::Packet.

495 {
496  _worldPacket << uint32(CUFProfiles.size());
497 
498  for (CUFProfile const* cufProfile : CUFProfiles)
499  {
500  _worldPacket.WriteBits(cufProfile->ProfileName.size(), 7);
501 
502  // Bool Options
503  for (uint8 option = 0; option < CUF_BOOL_OPTIONS_COUNT; option++)
504  _worldPacket.WriteBit(cufProfile->BoolOptions[option]);
505 
506  // Other Options
507  _worldPacket << cufProfile->FrameHeight;
508  _worldPacket << cufProfile->FrameWidth;
509 
510  _worldPacket << cufProfile->SortBy;
511  _worldPacket << cufProfile->HealthText;
512 
513  _worldPacket << cufProfile->TopPoint;
514  _worldPacket << cufProfile->BottomPoint;
515  _worldPacket << cufProfile->LeftPoint;
516 
517  _worldPacket << cufProfile->TopOffset;
518  _worldPacket << cufProfile->BottomOffset;
519  _worldPacket << cufProfile->LeftOffset;
520 
521  _worldPacket.WriteString(cufProfile->ProfileName);
522  }
523 
524  return &_worldPacket;
525 }
std::vector< CUFProfile const * > CUFProfiles
Definition: MiscPackets.h:666
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
Definition: Player.h:235
uint8_t uint8
Definition: Define.h:152
uint32_t uint32
Definition: g3dmath.h:168
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198
Represents a CompactUnitFrame profile.
Definition: Player.h:239

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<CUFProfile const*> WorldPackets::Misc::LoadCUFProfiles::CUFProfiles

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