summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-15 00:25:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-15 00:25:28 +0300
commitfcd38e8269205f062e27ea42d5107e5700023ff3 (patch)
treee432e583e695ee7e6ad4f386c7884175a568c141
parent64af13a976cbe5cf2d050d3d576f1d008c5a7708 (diff)
downloadmv-fcd38e8269205f062e27ea42d5107e5700023ff3.tar.gz
mv-fcd38e8269205f062e27ea42d5107e5700023ff3.tar.bz2
mv-fcd38e8269205f062e27ea42d5107e5700023ff3.tar.xz
mv-fcd38e8269205f062e27ea42d5107e5700023ff3.zip
eathena: remove some tmw/evol related packets.
-rw-r--r--src/net/eathena/loginhandler.cpp37
-rw-r--r--src/net/eathena/loginhandler.h4
-rw-r--r--src/net/eathena/network.cpp24
-rw-r--r--src/net/eathena/playerhandler.cpp3
-rw-r--r--src/net/eathena/protocol.h5
5 files changed, 11 insertions, 62 deletions
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index 2c641bace..4f0511987 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -49,8 +49,6 @@ LoginHandler::LoginHandler() :
{
static const uint16_t _messages[] =
{
- SMSG_UPDATE_HOST,
- SMSG_UPDATE_HOST2,
SMSG_LOGIN_DATA,
SMSG_LOGIN_ERROR,
SMSG_LOGIN_ERROR2,
@@ -73,14 +71,6 @@ void LoginHandler::handleMessage(Net::MessageIn &msg)
procecessCharPasswordResponse(msg);
break;
- case SMSG_UPDATE_HOST:
- processUpdateHost(msg);
- break;
-
- case SMSG_UPDATE_HOST2:
- processUpdateHost2(msg);
- break;
-
case SMSG_LOGIN_DATA:
processLoginData(msg);
break;
@@ -157,29 +147,6 @@ ServerInfo *LoginHandler::getCharServer() const
return &charServer;
}
-void LoginHandler::processUpdateHost2(Net::MessageIn &msg) const
-{
- const int len = msg.readInt16("len") - 4;
- const std::string updateHost = msg.readString(len, "host");
-
- splitToStringVector(loginData.updateHosts, updateHost, '|');
- FOR_EACH (StringVectIter, it, loginData.updateHosts)
- {
- if (!checkPath(*it))
- {
- logger->log1("Warning: incorrect update server name");
- loginData.updateHosts.clear();
- break;
- }
- }
-
- logger->log("Received update hosts \"%s\" from login server.",
- updateHost.c_str());
-
- if (client->getState() == STATE_PRE_LOGIN)
- client->setState(STATE_LOGIN);
-}
-
void LoginHandler::processLoginError2(Net::MessageIn &msg) const
{
const uint32_t code = msg.readInt32("error");
@@ -254,4 +221,8 @@ void LoginHandler::processLoginError2(Net::MessageIn &msg) const
client->setState(STATE_ERROR);
}
+void LoginHandler::processUpdateHost2(Net::MessageIn &msg) const
+{
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h
index b30de728c..d9b69496b 100644
--- a/src/net/eathena/loginhandler.h
+++ b/src/net/eathena/loginhandler.h
@@ -62,10 +62,10 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
ServerInfo *getCharServer() const override final A_WARN_UNUSED;
- void processUpdateHost2(Net::MessageIn &msg) const;
-
void processLoginError2(Net::MessageIn &msg) const;
+ void processUpdateHost2(Net::MessageIn &msg) const;
+
private:
void sendLoginRegister(const std::string &restrict username,
const std::string &restrict password,
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index 96675002d..78ff3377e 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -98,15 +98,8 @@ void Network::dispatchMessages()
SDL_mutexP(mMutexIn);
const unsigned int msgId = readWord(0);
int len = -1;
- if (msgId == SMSG_UPDATE_HOST2)
- {
- len = -1;
- }
- else
- {
- if (msgId < packet_lengths_size)
- len = packet_lengths[msgId];
- }
+ if (msgId < packet_lengths_size)
+ len = packet_lengths[msgId];
if (len == -1)
len = readWord(2);
@@ -147,17 +140,10 @@ bool Network::messageReady()
if (mInSize >= 2)
{
const int msgId = readWord(0);
- if (msgId == SMSG_UPDATE_HOST2)
- {
- len = -1;
- }
- else
+ if (msgId >= 0 && static_cast<unsigned int>(msgId)
+ < packet_lengths_size)
{
- if (msgId >= 0 && static_cast<unsigned int>(msgId)
- < packet_lengths_size)
- {
- len = packet_lengths[msgId];
- }
+ len = packet_lengths[msgId];
}
if (len == -1 && mInSize > 4)
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 33a8c611e..5f6341b25 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -235,9 +235,6 @@ void PlayerHandler::requestOnlineList() const
void PlayerHandler::updateStatus(const uint8_t status) const
{
- MessageOut outMsg(CMSG_SET_STATUS);
- outMsg.writeInt8(status);
- outMsg.writeInt8(0);
}
void PlayerHandler::setShortcut(const int idx,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index cb90f05a9..97bc7c7e4 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -29,7 +29,6 @@
#define SMSG_SERVER_PING 0x007f /**< Contains server tick */
#define SMSG_CONNECTION_PROBLEM 0x0081
-#define SMSG_UPDATE_HOST 0x0063 /**< Custom update host packet */
#define SMSG_LOGIN_DATA 0x0069
#define SMSG_LOGIN_ERROR 0x006a
#define SMSG_LOGIN_ERROR2 0x083e
@@ -380,10 +379,6 @@
#define SMSG_ONLINE_LIST 0x0211
#define SMSG_NPC_COMMAND 0x0212
-#define CMSG_SET_STATUS 0x0213
-
-#define SMSG_UPDATE_HOST2 0x7534
-
#define SMSG_MAP_ACCOUNT_ID 0x0283
#define SMSG_PLAYER_SHORTCUTS 0x07d9
#define SMSG_PLAYER_SHOW_EQUIP 0x02da