summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-27 17:14:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-27 17:14:45 +0300
commitf4776cb6852122ea1d6babc3a3df3bdbd401fce7 (patch)
treea53c31b3e789291d3edb3986fbf6359a2caa6efc
parentc61f1b6abe8e68995f00ae3a939afe5049e5cdb3 (diff)
downloadmanaplus-f4776cb6852122ea1d6babc3a3df3bdbd401fce7.tar.gz
manaplus-f4776cb6852122ea1d6babc3a3df3bdbd401fce7.tar.bz2
manaplus-f4776cb6852122ea1d6babc3a3df3bdbd401fce7.tar.xz
manaplus-f4776cb6852122ea1d6babc3a3df3bdbd401fce7.zip
Remove some manaserv enums usage.
-rw-r--r--src/client.cpp3
-rw-r--r--src/gui/windows/charselectdialog.cpp1
-rw-r--r--src/gui/windows/editserverdialog.cpp1
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/net/messagein.cpp16
-rw-r--r--src/net/messagein.h7
-rw-r--r--src/net/net.cpp1
-rw-r--r--src/net/serverinfo.h1
8 files changed, 1 insertions, 31 deletions
diff --git a/src/client.cpp b/src/client.cpp
index daae02221..5d635f522 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1527,8 +1527,7 @@ int Client::gameExec()
mCurrentDialog = new ConnectionDialog(
// TRANSLATORS: connection dialog header
_("Connecting to the game server"),
- Net::getNetworkType() != ServerInfo::MANASERV ?
- STATE_CHOOSE_SERVER : STATE_SWITCH_CHARACTER);
+ STATE_CHOOSE_SERVER);
mCurrentDialog->postInit();
Net::getGameHandler()->connect();
BLOCK_END("Client::gameExec STATE_CONNECT_GAME")
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 3ef378aa0..4480f06af 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -473,7 +473,6 @@ void CharSelectDialog::setCharacters(const Net::Characters &characters)
Net::Character *const character = *i;
- // Slots Number start at 1 for Manaserv, so we offset them by one.
const int characterSlot = character->slot;
if (characterSlot >= static_cast<int>(mCharacterEntries.size()))
{
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index c4e490091..316a7051b 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -143,7 +143,6 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
default:
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
- case ServerInfo::MANASERV:
#ifndef EATHENA_SUPPORT
case ServerInfo::EATHENA:
#endif
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index faae75ab3..af29da656 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -68,7 +68,6 @@ static std::string serverTypeToString(const ServerInfo::Type type)
return "eAthena";
#endif
default:
- case ServerInfo::MANASERV:
case ServerInfo::UNKNOWN:
return "";
}
@@ -86,7 +85,6 @@ static uint16_t defaultPortForServerType(const ServerInfo::Type type)
case ServerInfo::UNKNOWN:
case ServerInfo::TMWATHENA:
case ServerInfo::EVOL:
- case ServerInfo::MANASERV:
return 6901;
}
}
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<unsigned char const *const>(mData + mPos);
- x = static_cast<uint16_t>(p[0] | ((p[1] & 0x07) << 8));
- y = static_cast<uint16_t>((p[1] >> 3) | ((p[2] & 0x3F) << 5));
- }
- mPos += 3;
- PacketCounters::incInBytes(3);
- DEBUGLOG(std::string("readCoordinates: ").append(toString(
- static_cast<int>(x))).append(",").append(toString(
- static_cast<int>(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
@@ -65,13 +65,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