summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-20 17:56:24 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-20 17:58:36 +0300
commit4edf9cac82776c5333afaa647f7a982383837406 (patch)
tree8a70af55c3a7417d25c4be0bdbb422dae38edefb /src
parent2cd8b88679b9dd99e50bdc5ca03ba5694a0198a8 (diff)
downloadmv-4edf9cac82776c5333afaa647f7a982383837406.tar.gz
mv-4edf9cac82776c5333afaa647f7a982383837406.tar.bz2
mv-4edf9cac82776c5333afaa647f7a982383837406.tar.xz
mv-4edf9cac82776c5333afaa647f7a982383837406.zip
Remove unused old evol packets from tmwa namespace.
Diffstat (limited to 'src')
-rw-r--r--src/net/tmwa/beinghandler.cpp5
-rw-r--r--src/net/tmwa/charserverhandler.cpp23
-rw-r--r--src/net/tmwa/charserverhandler.h2
-rw-r--r--src/net/tmwa/chathandler.cpp98
-rw-r--r--src/net/tmwa/chathandler.h2
-rw-r--r--src/net/tmwa/loginhandler.cpp64
-rw-r--r--src/net/tmwa/network.cpp6
-rw-r--r--src/net/tmwa/playerhandler.cpp16
-rw-r--r--src/net/tmwa/protocol.h13
9 files changed, 37 insertions, 192 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 8f482047f..95eb9c111 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -75,7 +75,6 @@ BeingHandler::BeingHandler(const bool enableSync) :
SMSG_BEING_CHANGE_LOOKS,
SMSG_BEING_CHANGE_LOOKS2,
SMSG_BEING_NAME_RESPONSE,
- SMSG_BEING_NAME_RESPONSE2,
SMSG_PLAYER_GUILD_PARTY_INFO,
SMSG_BEING_CHANGE_DIRECTION,
SMSG_PLAYER_UPDATE_1,
@@ -168,10 +167,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
processNameResponse(msg);
break;
- case SMSG_BEING_NAME_RESPONSE2:
- processNameResponse2(msg);
- break;
-
case SMSG_BEING_IP_RESPONSE:
processIpResponse(msg);
break;
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 959e51289..218f30333 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -71,7 +71,6 @@ CharServerHandler::CharServerHandler() :
SMSG_CHAR_LOGIN,
SMSG_CHAR_LOGIN_ERROR,
SMSG_CHAR_CREATE_SUCCEEDED,
- SMSG_CHAR_CREATE_SUCCEEDED2,
SMSG_CHAR_CREATE_FAILED,
SMSG_CHAR_DELETE_SUCCEEDED,
SMSG_CHAR_DELETE_FAILED,
@@ -100,10 +99,6 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg)
processCharCreate(msg);
break;
- case SMSG_CHAR_CREATE_SUCCEEDED2:
- processCharCreate2(msg);
- break;
-
case SMSG_CHAR_CREATE_FAILED:
processCharCreateFailed(msg);
break;
@@ -493,24 +488,6 @@ void CharServerHandler::processCharCreate(Net::MessageIn &msg)
BLOCK_END("CharServerHandler::processCharCreate")
}
-void CharServerHandler::processCharCreate2(Net::MessageIn &msg)
-{
- BLOCK_START("CharServerHandler::processCharCreate2")
- Net::Character *const character = new Net::Character;
- charServerHandler->readPlayerData(msg, character, true);
- mCharacters.push_back(character);
-
- updateCharSelectDialog();
-
- // Close the character create dialog
- if (mCharCreateDialog)
- {
- mCharCreateDialog->scheduleDelete();
- mCharCreateDialog = nullptr;
- }
- BLOCK_END("CharServerHandler::processCharCreate2")
-}
-
void CharServerHandler::renameCharacter(const BeingId id A_UNUSED,
const std::string &newName A_UNUSED)
{
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index a9f99218e..3c4b0a715 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -97,8 +97,6 @@ class CharServerHandler final : public MessageHandler,
protected:
static void processCharCreate(Net::MessageIn &msg);
- static void processCharCreate2(Net::MessageIn &msg);
-
static void processCharDeleteFailed(Net::MessageIn &msg);
};
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 152a31bd8..a11c6149f 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -56,9 +56,7 @@ ChatHandler::ChatHandler() :
static const uint16_t _messages[] =
{
SMSG_BEING_CHAT,
- SMSG_BEING_CHAT2,
SMSG_PLAYER_CHAT,
- SMSG_PLAYER_CHAT2,
SMSG_WHISPER,
SMSG_WHISPER_RESPONSE,
SMSG_GM_CHAT,
@@ -89,19 +87,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processBeingChat(msg);
break;
- // Received speech from being
- case SMSG_BEING_CHAT2:
- processBeingChat(msg);
- break;
-
case SMSG_PLAYER_CHAT:
processChat(msg);
break;
- case SMSG_PLAYER_CHAT2:
- processChat2(msg);
- break;
-
case SMSG_GM_CHAT:
processGmChat(msg);
break;
@@ -121,7 +110,7 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
}
void ChatHandler::talk(const std::string &restrict text,
- const std::string &restrict channel) const
+ const std::string &restrict channel A_UNUSED) const
{
if (!localPlayer)
return;
@@ -129,24 +118,10 @@ void ChatHandler::talk(const std::string &restrict text,
const std::string mes = std::string(localPlayer->getName()).append(
" : ").append(text);
- if (serverFeatures->haveSpecialChatChannels() && channel.size() == 3)
- {
- createOutPacket(CMSG_CHAT_MESSAGE2);
- // Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 3 + 1),
- "len");
- outMsg.writeInt8(channel[0], "channel byte 0");
- outMsg.writeInt8(channel[1], "channel byte 1");
- outMsg.writeInt8(channel[2], "channel byte 2");
- outMsg.writeString(mes, static_cast<int>(mes.length() + 1), "message");
- }
- else
- {
- createOutPacket(CMSG_CHAT_MESSAGE);
- // Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1), "len");
- outMsg.writeString(mes, static_cast<int>(mes.length() + 1), "message");
- }
+ createOutPacket(CMSG_CHAT_MESSAGE);
+ // Added + 1 in order to let eAthena parse admin commands correctly
+ outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1), "len");
+ outMsg.writeString(mes, static_cast<int>(mes.length() + 1), "message");
}
void ChatHandler::talkRaw(const std::string &mes) const
@@ -303,23 +278,6 @@ void ChatHandler::processChat(Net::MessageIn &msg)
processChatContinue(msg.readRawString(chatMsgLength, "message"), "");
}
-void ChatHandler::processChat2(Net::MessageIn &msg)
-{
- BLOCK_START("ChatHandler::processChat")
- const int chatMsgLength = msg.readInt16("len") - 4 - 3;
- std::string channel;
- channel = msg.readUInt8("channel byte 0");
- channel += msg.readUInt8("channel byte 1");
- channel += msg.readUInt8("channel byte 2");
- if (chatMsgLength <= 0)
- {
- BLOCK_END("ChatHandler::processChat")
- return;
- }
-
- processChatContinue(msg.readRawString(chatMsgLength, "message"), channel);
-}
-
void ChatHandler::processChatContinue(std::string chatMsg,
const std::string &channel)
{
@@ -373,18 +331,8 @@ void ChatHandler::processChatContinue(std::string chatMsg,
void ChatHandler::processGmChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")
- const bool channels = msg.getId() == SMSG_PLAYER_CHAT2;
- const bool normalChat = msg.getId() == SMSG_PLAYER_CHAT
- || msg.getId() == SMSG_PLAYER_CHAT2;
+ const bool normalChat = msg.getId() == SMSG_PLAYER_CHAT;
int chatMsgLength = msg.readInt16("len") - 4;
- std::string channel;
- if (channels)
- {
- chatMsgLength -= 3;
- channel = msg.readUInt8("channel byte 0");
- channel += msg.readUInt8("channel byte 1");
- channel += msg.readUInt8("channel byte 2");
- }
if (chatMsgLength <= 0)
{
BLOCK_END("ChatHandler::processChat")
@@ -401,23 +349,21 @@ void ChatHandler::processGmChat(Net::MessageIn &msg)
{
allow = chatWindow->resortChatLog(chatMsg,
ChatMsgType::BY_PLAYER,
- channel,
+ GENERAL_CHANNEL,
IgnoreRecord_false,
TryRemoveColors_true);
}
- if (channel.empty())
+ const std::string senseStr("You sense the following: ");
+ if (actorManager && !chatMsg.find(senseStr))
{
- const std::string senseStr("You sense the following: ");
- if (actorManager && !chatMsg.find(senseStr))
- {
- actorManager->parseLevels(
- chatMsg.substr(senseStr.size()));
- }
+ actorManager->parseLevels(
+ chatMsg.substr(senseStr.size()));
}
- if (pos == std::string::npos && !mShowMotd
- && mSkipping && channel.empty())
+ if (pos == std::string::npos &&
+ !mShowMotd &&
+ mSkipping)
{
// skip motd from "new" tmw server
if (mMotdTime == -1)
@@ -436,7 +382,7 @@ void ChatHandler::processGmChat(Net::MessageIn &msg)
if (localPlayer)
{
if ((chatWindow || mShowMotd) && allow)
- localPlayer->setSpeech(chatMsg, channel);
+ localPlayer->setSpeech(chatMsg, GENERAL_CHANNEL);
}
}
else if (localChatTab)
@@ -610,7 +556,6 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
return;
BLOCK_START("ChatHandler::processBeingChat")
- const bool channels = msg.getId() == SMSG_BEING_CHAT2;
int chatMsgLength = msg.readInt16("len") - 8;
Being *const being = actorManager->findBeing(msg.readBeingId("being id"));
if (!being)
@@ -619,15 +564,6 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
return;
}
- std::string channel;
- if (channels)
- {
- chatMsgLength -= 3;
- channel = msg.readUInt8("channel byte 0");
- channel += msg.readUInt8("channel byte 1");
- channel += msg.readUInt8("channel byte 2");
- }
-
if (chatMsgLength <= 0)
{
BLOCK_END("ChatHandler::processBeingChat")
@@ -673,7 +609,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
allow = chatWindow->resortChatLog(
removeColors(sender_name).append(" : ").append(chatMsg),
ChatMsgType::BY_OTHER,
- channel,
+ GENERAL_CHANNEL,
IgnoreRecord_false,
TryRemoveColors_true);
}
@@ -681,7 +617,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
if (allow && player_relations.hasPermission(sender_name,
PlayerRelation::SPEECH_FLOAT))
{
- being->setSpeech(chatMsg, channel);
+ being->setSpeech(chatMsg, GENERAL_CHANNEL);
}
BLOCK_END("ChatHandler::processBeingChat")
}
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index 58c292275..6d04abfe7 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -99,8 +99,6 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
protected:
static void processChat(Net::MessageIn &msg);
- static void processChat2(Net::MessageIn &msg);
-
static void processChatContinue(std::string chatMsg,
const std::string &channel);
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 8eaba8805..5331d8045 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -54,7 +54,6 @@ LoginHandler::LoginHandler() :
static const uint16_t _messages[] =
{
SMSG_UPDATE_HOST,
- SMSG_UPDATE_HOST2,
SMSG_LOGIN_DATA,
SMSG_LOGIN_ERROR,
SMSG_CHAR_PASSWORD_RESPONSE,
@@ -82,10 +81,6 @@ void LoginHandler::handleMessage(Net::MessageIn &msg)
processUpdateHost(msg);
break;
- case SMSG_UPDATE_HOST2:
- processUpdateHost2(msg);
- break;
-
case SMSG_LOGIN_DATA:
processLoginData(msg);
break;
@@ -139,49 +134,31 @@ void LoginHandler::changePassword(const std::string &restrict oldPassword,
void LoginHandler::sendLoginRegister(const std::string &restrict username,
const std::string &restrict password,
- const std::string &restrict email) const
+ const std::string &restrict email
+ A_UNUSED) const
{
- if (email.empty())
+ createOutPacket(CMSG_LOGIN_REGISTER);
+ if (serverVersion > 0)
{
- createOutPacket(CMSG_LOGIN_REGISTER);
- if (serverVersion > 0)
- {
- outMsg.writeInt32(CLIENT_PROTOCOL_VERSION,
- "client protocol version");
- }
- else
- {
- outMsg.writeInt32(CLIENT_TMW_PROTOCOL_VERSION,
- "client protocol version");
- }
-
- outMsg.writeString(username, 24, "login");
- outMsg.writeStringNoLog(password, 24, "password");
-
- /*
- * eAthena calls the last byte "client version 2", but it isn't used at
- * at all. We're retasking it, as a bit mask:
- * 0 - can handle the 0x63 "update host" packet
- * 1 - defaults to the first char-server (instead of the last)
- */
- outMsg.writeInt8(0x03, "flags");
+ outMsg.writeInt32(CLIENT_PROTOCOL_VERSION,
+ "client protocol version");
}
else
{
- createOutPacket(CMSG_LOGIN_REGISTER2);
- outMsg.writeInt32(0, "client version");
- outMsg.writeString(username, 24, "login");
- outMsg.writeStringNoLog(password, 24, "password");
-
- /*
- * eAthena calls the last byte "client version 2", but it isn't used at
- * at all. We're retasking it, as a bit mask:
- * 0 - can handle the 0x63 "update host" packet
- * 1 - defaults to the first char-server (instead of the last)
- */
- outMsg.writeInt8(0x03, "flags");
- outMsg.writeString(email, 24, "email");
+ outMsg.writeInt32(CLIENT_TMW_PROTOCOL_VERSION,
+ "client protocol version");
}
+
+ outMsg.writeString(username, 24, "login");
+ outMsg.writeStringNoLog(password, 24, "password");
+
+ /*
+ * eAthena calls the last byte "client version 2", but it isn't used at
+ * at all. We're retasking it, as a bit mask:
+ * 0 - can handle the 0x63 "update host" packet
+ * 1 - defaults to the first char-server (instead of the last)
+ */
+ outMsg.writeInt8(0x03, "flags");
}
ServerInfo *LoginHandler::getCharServer() const
@@ -191,9 +168,6 @@ ServerInfo *LoginHandler::getCharServer() const
void LoginHandler::requestUpdateHosts()
{
- createOutPacket(CMSG_SEND_CLIENT_INFO);
- outMsg.writeInt8(CLIENT_PROTOCOL_VERSION, "protocol version");
- outMsg.writeInt8(0, "unused");
}
void LoginHandler::processServerVersion(Net::MessageIn &msg)
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 28760d2cc..97bbcd9c0 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -102,8 +102,6 @@ void Network::dispatchMessages()
int len = -1;
if (msgId == SMSG_SERVER_VERSION_RESPONSE)
len = 10;
- else if (msgId == SMSG_UPDATE_HOST2)
- len = -1;
else if (msgId < packet_lengths_size)
len = packet_lengths[msgId];
@@ -157,10 +155,6 @@ bool Network::messageReady()
{
len = 10;
}
- else if (msgId == SMSG_UPDATE_HOST2)
- {
- len = -1;
- }
else
{
if (msgId >= 0 && static_cast<unsigned int>(msgId)
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 6e638687a..f0d9d5b08 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -54,8 +54,6 @@ PlayerHandler::PlayerHandler() :
SMSG_PLAYER_STAT_UPDATE_5,
SMSG_PLAYER_STAT_UPDATE_6,
SMSG_PLAYER_ARROW_MESSAGE,
- SMSG_ONLINE_LIST,
- SMSG_MAP_MASK,
SMSG_MAP_MUSIC,
0
};
@@ -105,14 +103,6 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
processPlayerArrowMessage(msg);
break;
- case SMSG_ONLINE_LIST:
- processOnlineList(msg);
- break;
-
- case SMSG_MAP_MASK:
- processMapMask(msg);
- break;
-
case SMSG_MAP_MUSIC:
processMapMusic(msg);
break;
@@ -227,7 +217,6 @@ void PlayerHandler::respawn() const
void PlayerHandler::requestOnlineList() const
{
- createOutPacket(CMSG_ONLINE_LIST);
}
void PlayerHandler::removeOption() const
@@ -242,11 +231,8 @@ void PlayerHandler::setMemo() const
{
}
-void PlayerHandler::updateStatus(const uint8_t status) const
+void PlayerHandler::updateStatus(const uint8_t status A_UNUSED) const
{
- createOutPacket(CMSG_SET_STATUS);
- outMsg.writeInt8(status, "status");
- outMsg.writeInt8(0, "unused");
}
void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index 9a455e03a..04a3588e4 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -32,7 +32,6 @@
packet(SMSG_SERVER_VERSION_RESPONSE, 0x7531);
packet(CMSG_LOGIN_REGISTER, 0x0064);
-packet(CMSG_LOGIN_REGISTER2, 0x01de);
packet(SMSG_SERVER_PING, 0x007f); /**< Contains server tick */
packet(SMSG_CONNECTION_PROBLEM, 0x0081);
@@ -44,7 +43,6 @@ packet(SMSG_LOGIN_ERROR, 0x006a);
packet(SMSG_CHAR_LOGIN, 0x006b);
packet(SMSG_CHAR_LOGIN_ERROR, 0x006c);
packet(SMSG_CHAR_CREATE_SUCCEEDED, 0x006d);
-packet(SMSG_CHAR_CREATE_SUCCEEDED2, 0x0221);
packet(SMSG_CHAR_CREATE_FAILED, 0x006e);
packet(SMSG_CHAR_DELETE_SUCCEEDED, 0x006f);
@@ -102,10 +100,8 @@ packet(SMSG_BEING_SELFEFFECT, 0x019b);
packet(SMSG_BEING_EMOTION, 0x00c0);
packet(SMSG_BEING_ACTION, 0x008a); /**< Attack, sit, stand up, ... */
packet(SMSG_BEING_CHAT, 0x008d); /**< A being talks */
-packet(SMSG_BEING_CHAT2, 0x0223); /**< A being talks in channels */
packet(CMSG_NAME_REQUEST, 0x0094);
packet(SMSG_BEING_NAME_RESPONSE, 0x0095); /**< Has to be requested */
-packet(SMSG_BEING_NAME_RESPONSE2, 0x0220); /**< Has to be requested */
packet(SMSG_BEING_CHANGE_DIRECTION, 0x009c);
packet(SMSG_BEING_RESURRECT, 0x0148);
@@ -125,7 +121,6 @@ packet(SMSG_NPC_SELL_RESPONSE, 0x00cb);
packet(SMSG_NPC_INT_INPUT, 0x0142); /**< Integer input */
packet(SMSG_NPC_STR_INPUT, 0x01d4); /**< String input */
packet(SMSG_PLAYER_CHAT, 0x008e); /**< Player talks */
-packet(SMSG_PLAYER_CHAT2, 0x0224); /**< Player talks */
packet(SMSG_WHISPER, 0x0097); /**< Whisper Recieved */
packet(SMSG_WHISPER_RESPONSE, 0x0098);
packet(SMSG_GM_CHAT, 0x009a); /**< GM announce */
@@ -208,7 +203,6 @@ packet(CMSG_MAP_LOADED, 0x007d);
packet(CMSG_CLIENT_QUIT, 0x018A);
packet(CMSG_CHAT_MESSAGE, 0x008c);
-packet(CMSG_CHAT_MESSAGE2, 0x0222);
packet(CMSG_CHAT_WHISPER, 0x0096);
packet(CMSG_CHAT_WHO, 0x00c1);
@@ -302,20 +296,13 @@ packet(SMSG_PVP_MAP_MODE, 0x0199);
packet(SMSG_PVP_SET, 0x019a);
packet(CMSG_IGNORE_ALL, 0x00d0);
packet(SMSG_IGNORE_ALL_RESPONSE, 0x00d2);
-packet(CMSG_ONLINE_LIST, 0x0210);
-packet(SMSG_ONLINE_LIST, 0x0211);
packet(SMSG_NPC_COMMAND, 0x0212);
-packet(CMSG_SET_STATUS, 0x0213);
packet(SMSG_QUEST_SET_VAR, 0x0214);
packet(SMSG_QUEST_PLAYER_VARS, 0x0215);
packet(SMSG_BEING_MOVE3, 0x0225);
-packet(SMSG_MAP_MASK, 0x0226);
packet(SMSG_MAP_MUSIC, 0x0227);
packet(SMSG_NPC_CHANGETITLE, 0x0228);
-packet(CMSG_SEND_CLIENT_INFO, 0x7533);
-packet(SMSG_UPDATE_HOST2, 0x7534);
-
#undef packet
#endif // NET_TMWA_PROTOCOL_H