Mana
|
Used for building an outgoing message to eAthena. More...
#include <messageout.h>
Public Member Functions | |
MessageOut (uint16_t id) | |
void | writeInt8 (uint8_t value) |
Writes an unsigned 8-bit integer to the message. | |
void | writeInt16 (uint16_t value) |
Writes an unsigned 16-bit integer to the message. | |
void | writeInt32 (uint32_t value) |
Writes an unsigned 32-bit integer to the message. | |
void | writeString (const std::string &string, int length=-1) |
Writes a string. | |
void | writeCoordinates (uint16_t x, uint16_t y, uint8_t direction) |
Encodes coordinates and direction in 3 bytes. | |
Static Private Member Functions | |
static char * | expand (size_t size) |
Expand the packet data to be able to hold more data. | |
Used for building an outgoing message to eAthena.
Definition at line 34 of file messageout.h.
TmwAthena::MessageOut::MessageOut | ( | uint16_t | id | ) |
Definition at line 34 of file messageout.cpp.
|
staticprivate |
Expand the packet data to be able to hold more data.
Returns a pointer to the start of the new data.
Definition at line 42 of file messageout.cpp.
void TmwAthena::MessageOut::writeCoordinates | ( | uint16_t | x, |
uint16_t | y, | ||
uint8_t | direction | ||
) |
Encodes coordinates and direction in 3 bytes.
Definition at line 94 of file messageout.cpp.
void TmwAthena::MessageOut::writeInt16 | ( | uint16_t | value | ) |
Writes an unsigned 16-bit integer to the message.
Definition at line 55 of file messageout.cpp.
void TmwAthena::MessageOut::writeInt32 | ( | uint32_t | value | ) |
Writes an unsigned 32-bit integer to the message.
Definition at line 61 of file messageout.cpp.
void TmwAthena::MessageOut::writeInt8 | ( | uint8_t | value | ) |
Writes an unsigned 8-bit integer to the message.
Definition at line 50 of file messageout.cpp.
void TmwAthena::MessageOut::writeString | ( | const std::string & | string, |
int | length = -1 |
||
) |
Writes a string.
If a fixed length is not given (-1), it is stored as a short at the start of the string.
Definition at line 67 of file messageout.cpp.