From f4776cb6852122ea1d6babc3a3df3bdbd401fce7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Feb 2014 17:14:45 +0300 Subject: Remove some manaserv enums usage. --- src/net/messagein.cpp | 16 ---------------- src/net/messagein.h | 7 ------- src/net/net.cpp | 1 - src/net/serverinfo.h | 1 - 4 files changed, 25 deletions(-) (limited to 'src/net') diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index a6008da42..121e1e58f 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -59,22 +59,6 @@ unsigned char MessageIn::readInt8() return value; } -void MessageIn::readCoordinates(uint16_t &restrict x, uint16_t &restrict y) -{ - if (mPos + 3 <= mLength) - { - const unsigned char *const p - = reinterpret_cast(mData + mPos); - x = static_cast(p[0] | ((p[1] & 0x07) << 8)); - y = static_cast((p[1] >> 3) | ((p[2] & 0x3F) << 5)); - } - mPos += 3; - PacketCounters::incInBytes(3); - DEBUGLOG(std::string("readCoordinates: ").append(toString( - static_cast(x))).append(",").append(toString( - static_cast(y)))); -} - uint8_t MessageIn::fromServerDirection(const uint8_t serverDir) { // Translate from eAthena format diff --git a/src/net/messagein.h b/src/net/messagein.h index c3ed294c3..7b2b2400b 100644 --- a/src/net/messagein.h +++ b/src/net/messagein.h @@ -64,13 +64,6 @@ class MessageIn virtual int readInt32() = 0; /**< Reads a long. */ - /** - * Reads a 3-byte block containing tile-based coordinates. Used by - * manaserv. - */ - virtual void readCoordinates(uint16_t &restrict x, - uint16_t &restrict y); - /** * Reads a special 3 byte block used by eAthena, containing x and y * coordinates and direction. diff --git a/src/net/net.cpp b/src/net/net.cpp index 6b744c673..90cf9e16a 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -158,7 +158,6 @@ void connectToServer(const ServerInfo &server) new TmwAthena::GeneralHandler; #endif break; - case ServerInfo::MANASERV: case ServerInfo::TMWATHENA: case ServerInfo::UNKNOWN: default: diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index 6035a1f51..48f216855 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -38,7 +38,6 @@ public: enum Type { UNKNOWN = 0, - MANASERV, TMWATHENA, EVOL, EATHENA -- cgit v1.2.3-70-g09d2