48 static const Uint16 _messages[] = {
66 unsigned char direction;
71 Log::info(
"Protocol: Player start position: (%d, %d), Direction: %d",
89 new OkDialog(
_(
"Game"),
_(
"Request to quit denied!"),
false,
166 mMap = map.substr(0, map.rfind(
"."));
172 return game->getCurrentTileWidth();
void setPosition(const Vector &pos) final
Sets the pixel position of this actor.
static void setState(State state)
void listen(Event::Channel channel)
The main class responsible for running the game.
Map * getCurrentMap()
Returns the currently active map.
static Game * instance()
Provides access to the game instance.
void changeMap(const std::string &mapName)
Changes the currently active map.
const uint16_t * handledMessages
void handleMessage(MessageIn &msg) override
int getPickupRange() const override
Tells the range is pixel where the player can pickup items from.
void disconnect() override
void setMap(const std::string &map)
bool isConnected() override
void event(Event::Channel channel, const Event &event) override
std::string mMap
Keeps the map filename.
int mTileX
< Saved for map-server switching
Used for parsing an incoming message from eAthena.
void readCoordinates(uint16_t &x, uint16_t &y, uint8_t &direction)
Reads a special 3 byte block used by eAthena, containing x and y coordinates and direction.
void skip(unsigned int length)
Skips a given number of bytes.
uint16_t readInt16()
Reads an unsigned 16-bit integer from the message.
uint8_t readInt8()
Reads an unsigned 8-bit integer from the message.
uint16_t getId() const
Returns the message ID.
uint32_t readInt32()
Reads an unsigned 32-bit integer from the message.
Used for building an outgoing message to eAthena.
void writeInt32(uint32_t value)
Writes an unsigned 32-bit integer to the message.
void writeInt8(uint8_t value)
Writes an unsigned 8-bit integer to the message.
bool connect(const ServerInfo &server)
LocalPlayer * local_player
ManaServ::GameHandler * gameHandler
Net::GameHandler * gameHandler
const int DEFAULT_TILE_LENGTH
void info(const char *log_text,...) LOG_PRINTF_ATTR
LoginHandler * getLoginHandler()
Warning: buffers and other variables are shared, so there can be only one connection active at a time...
@ SMSG_CHAR_SWITCH_RESPONSE
@ CMSG_MAP_SERVER_CONNECT