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

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

#include <TransmittedPackets.hpp>

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

Public Member Functions

 ZC_ROOM_NEWENTRY (std::shared_ptr< ZoneSession > s)
 
virtual ~ZC_ROOM_NEWENTRY ()
 
void deliver (int owner_id, int char_id, int limit, int users, int type, std::string title)
 ZC_ROOM_NEWENTRY. 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 { 0 }
 
int _char_id { 0 }
 
int16_t _limit { 0 }
 
int16_t _users { 0 }
 
int8_t _type { 0 }
 
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_ROOM_NEWENTRY.

Constructor & Destructor Documentation

◆ ZC_ROOM_NEWENTRY()

Horizon::Zone::ZC_ROOM_NEWENTRY::ZC_ROOM_NEWENTRY ( std::shared_ptr< ZoneSession s)
inline
41464 : NetworkPacket<ZoneSession>(ID_ZC_ROOM_NEWENTRY, s)
41465 {}
@ ID_ZC_ROOM_NEWENTRY
Definition: TransmittedPackets.hpp:41437

◆ ~ZC_ROOM_NEWENTRY()

virtual Horizon::Zone::ZC_ROOM_NEWENTRY::~ZC_ROOM_NEWENTRY ( )
inlinevirtual
41466{}

Member Function Documentation

◆ deliver()

void ZC_ROOM_NEWENTRY::deliver ( int  owner_id,
int  char_id,
int  limit,
int  users,
int  type,
std::string  title 
)

ZC_ROOM_NEWENTRY.

2836{
2837 _owner_id = owner_id;
2838 _char_id = char_id;
2839 _limit = limit;
2840 _users = users;
2841 _type = type;
2842 std::strncpy(_title, title.c_str(), CHATROOM_TITLE_SIZE);
2843 _packet_length = 17 + title.length();
2844
2845 serialize();
2846 transmit();
2847}
#define CHATROOM_TITLE_SIZE
Definition: ClientDefinitions.hpp:360
void transmit()
Send an Asynchronous packet by queueing a buffer of a particular size to the connected session.
Definition: NetworkPacket.hpp:94
ByteBuffer & serialize()
Definition: TransmittedPackets.cpp:2849
int _owner_id
Definition: TransmittedPackets.hpp:41473
int _char_id
Definition: TransmittedPackets.hpp:41474
int8_t _type
Definition: TransmittedPackets.hpp:41477
int16_t _packet_length
Definition: TransmittedPackets.hpp:41472
int16_t _users
Definition: TransmittedPackets.hpp:41476
char _title[CHATROOM_TITLE_SIZE]
Definition: TransmittedPackets.hpp:41478
int16_t _limit
Definition: TransmittedPackets.hpp:41475

References _char_id, _limit, _owner_id, _packet_length, _title, _type, _users, CHATROOM_TITLE_SIZE, serialize(), and Horizon::Base::NetworkPacket< ZoneSession >::transmit().

+ Here is the call graph for this function:

◆ serialize()

ByteBuffer & ZC_ROOM_NEWENTRY::serialize ( )
2850{
2851 buf() << _packet_id;
2852 buf() << _packet_length;
2853 buf() << _owner_id;
2854 buf() << _char_id;
2855 buf() << _limit;
2856 buf() << _users;
2857 buf() << _type;
2859
2860 return buf();
2861}
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 _char_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.

Referenced by deliver().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _char_id

int Horizon::Zone::ZC_ROOM_NEWENTRY::_char_id { 0 }

Referenced by deliver(), and serialize().

◆ _limit

int16_t Horizon::Zone::ZC_ROOM_NEWENTRY::_limit { 0 }

Referenced by deliver(), and serialize().

◆ _owner_id

int Horizon::Zone::ZC_ROOM_NEWENTRY::_owner_id { 0 }

Referenced by deliver(), and serialize().

◆ _packet_length

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

Referenced by deliver(), and serialize().

◆ _title

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

Referenced by deliver(), and serialize().

◆ _type

int8_t Horizon::Zone::ZC_ROOM_NEWENTRY::_type { 0 }

Referenced by deliver(), and serialize().

◆ _users

int16_t Horizon::Zone::ZC_ROOM_NEWENTRY::_users { 0 }

Referenced by deliver(), and serialize().


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