Horizon Official Technical Documentation
Horizon::Zone::ZC_CHANGE_CHATROOM Class Reference

Main object for the aegis packet: ZC_CHANGE_CHATROOM. More...

#include <TransmittedPackets.hpp>

+ Inheritance diagram for Horizon::Zone::ZC_CHANGE_CHATROOM:
+ Collaboration diagram for Horizon::Zone::ZC_CHANGE_CHATROOM:

Public Member Functions

 ZC_CHANGE_CHATROOM (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_CHANGE_CHATROOM ()
 
void deliver (int owner_id, int chat_id, int limit, int users, zc_change_chatroom_type type, std::string title)
 ZC_CHANGE_CHATROOM. More...
 
ByteBufferserialize ()
 
- Public Member Functions inherited from Horizon::Base::NetworkPacket< ZoneSession >
 NetworkPacket (uint16_t packet_id, std::shared_ptr< ZoneSession > s)
 
virtual ~NetworkPacket ()
 
void set_packet_id (uint16_t id)
 
uint16_t get_packet_id ()
 
ByteBufferbuf ()
 
std::shared_ptr< ZoneSession > get_session ()
 Retrieves the session from this handler instance. More...
 
virtual void handle (ByteBuffer &&buf)
 
virtual void deserialize (ByteBuffer &buf)
 
void transmit ()
 Send an Asynchronous packet by queueing a buffer of a particular size to the connected session. More...
 
void transmit (std::size_t size)
 Send an Asynchronous packet by queueing a buffer of a particular size to the connected session. More...
 

Public Attributes

int16_t _packet_length { 0 }
 
int _owner_id
 
int _chat_id
 
int16_t _limit
 
int16_t _users
 
int8_t _type
 
char _title [CHATROOM_TITLE_SIZE]
 

Additional Inherited Members

- Protected Attributes inherited from Horizon::Base::NetworkPacket< ZoneSession >
ByteBuffer _buffer
 Buffer storage facility for the packet stream. More...
 
uint16_t _packet_id
 ID of the network packet. More...
 

Detailed Description

Main object for the aegis packet: ZC_CHANGE_CHATROOM.

Constructor & Destructor Documentation

◆ ZC_CHANGE_CHATROOM()

Horizon::Zone::ZC_CHANGE_CHATROOM::ZC_CHANGE_CHATROOM ( std::shared_ptr< ZoneSession s)
inline
22823 : NetworkPacket<ZoneSession>(ID_ZC_CHANGE_CHATROOM, s)
22824 {}
@ ID_ZC_CHANGE_CHATROOM
Definition: TransmittedPackets.hpp:22796

◆ ~ZC_CHANGE_CHATROOM()

virtual Horizon::Zone::ZC_CHANGE_CHATROOM::~ZC_CHANGE_CHATROOM ( )
inlinevirtual
22825{}

Member Function Documentation

◆ deliver()

void ZC_CHANGE_CHATROOM::deliver ( int  owner_id,
int  chat_id,
int  limit,
int  users,
zc_change_chatroom_type  type,
std::string  title 
)

ZC_CHANGE_CHATROOM.

910{
911 _packet_length = 17 + title.length();
912 _owner_id = owner_id;
913 _chat_id = chat_id;
914 _limit = limit;
915 _users = users;
916 _type = (int8_t)type;
917 std::strncpy(_title, title.c_str(), CHATROOM_TITLE_SIZE);
918
919}
#define CHATROOM_TITLE_SIZE
Definition: ClientDefinitions.hpp:360
int8_t _type
Definition: TransmittedPackets.hpp:22836
int _owner_id
Definition: TransmittedPackets.hpp:22832
char _title[CHATROOM_TITLE_SIZE]
Definition: TransmittedPackets.hpp:22837
int16_t _limit
Definition: TransmittedPackets.hpp:22834
int16_t _packet_length
Definition: TransmittedPackets.hpp:22831
int _chat_id
Definition: TransmittedPackets.hpp:22833
int16_t _users
Definition: TransmittedPackets.hpp:22835

References _chat_id, _limit, _owner_id, _packet_length, _title, _type, _users, and CHATROOM_TITLE_SIZE.

◆ serialize()

ByteBuffer & ZC_CHANGE_CHATROOM::serialize ( )
922{
923 buf() << _packet_id;
924 buf() << _packet_length;
925 buf() << _owner_id;
926 buf() << _chat_id;
927 buf() << _limit;
928 buf() << _users;
929 buf() << _type;
931 return buf();
932}
void append(T value)
Definition: ByteBuffer.hpp:140
uint16_t _packet_id
ID of the network packet.
Definition: NetworkPacket.hpp:87
ByteBuffer & buf()
Definition: NetworkPacket.hpp:59

References _chat_id, _limit, _owner_id, Horizon::Base::NetworkPacket< ZoneSession >::_packet_id, _packet_length, _title, _type, _users, ByteBuffer::append(), Horizon::Base::NetworkPacket< ZoneSession >::buf(), and CHATROOM_TITLE_SIZE.

+ Here is the call graph for this function:

Member Data Documentation

◆ _chat_id

int Horizon::Zone::ZC_CHANGE_CHATROOM::_chat_id

Referenced by deliver(), and serialize().

◆ _limit

int16_t Horizon::Zone::ZC_CHANGE_CHATROOM::_limit

Referenced by deliver(), and serialize().

◆ _owner_id

int Horizon::Zone::ZC_CHANGE_CHATROOM::_owner_id

Referenced by deliver(), and serialize().

◆ _packet_length

int16_t Horizon::Zone::ZC_CHANGE_CHATROOM::_packet_length { 0 }

Referenced by deliver(), and serialize().

◆ _title

char Horizon::Zone::ZC_CHANGE_CHATROOM::_title[CHATROOM_TITLE_SIZE]

Referenced by deliver(), and serialize().

◆ _type

int8_t Horizon::Zone::ZC_CHANGE_CHATROOM::_type

Referenced by deliver(), and serialize().

◆ _users

int16_t Horizon::Zone::ZC_CHANGE_CHATROOM::_users

Referenced by deliver(), and serialize().


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