46 static const Uint16 _messages[] = {
125 msg.
writeInt8((
unsigned char) reconnectAccount);
static void setState(State state)
void setAttackRange(int range)
Sets the attack range.
bool isConnected()
Returns whether the server is connected.
void send(const ManaServ::MessageOut &msg)
Sends a message.
bool connect(const std::string &address, enet_uint16 port)
Connects to the given server with the specified address and port.
void disconnect()
Disconnects from the given server.
void handleMessage(MessageIn &msg) override
bool isConnected() override
void disconnect() override
Used for parsing an incoming message from manaserv.
std::string readString(int length=-1)
Reads a string.
uint16_t getId() const
Returns the message ID.
uint8_t readInt8()
Reads an unsigned 8-bit integer from the message.
Used for building an outgoing message to manaserv.
void writeInt8(uint8_t value)
Writes an unsigned 8-bit integer to the message.
void writeString(const std::string &string, int length=-1)
Writes a string.
const uint16_t * handledMessages
LocalPlayer * local_player
ManaServ::GameHandler * gameHandler
Net::ChatHandler * chatHandler
ManaServ::ChatHandler * chatHandler
Net::GameHandler * gameHandler
Connection * gameServerConnection
Connection * chatServerConnection
@ GPMSG_DISCONNECT_RESPONSE