summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-02 17:40:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commit148bafe5950332613068f60543e5a1833e661587 (patch)
treecfba3719482da21e9a0f4cff2e1ce2ad23c437e0 /src/net/ea/chathandler.cpp
parent7976202af5db10450d111d7e204b68bb40c1a489 (diff)
downloadmanaverse-148bafe5950332613068f60543e5a1833e661587.tar.gz
manaverse-148bafe5950332613068f60543e5a1833e661587.tar.bz2
manaverse-148bafe5950332613068f60543e5a1833e661587.tar.xz
manaverse-148bafe5950332613068f60543e5a1833e661587.zip
add packet comments in chathandler.
Diffstat (limited to 'src/net/ea/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 205c17824..d835437e8 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -98,7 +98,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
mSentWhispers.pop();
}
- const uint8_t type = msg.readUInt8();
+ const uint8_t type = msg.readUInt8("response");
switch (type)
{
case 0x00:
@@ -138,8 +138,8 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
void ChatHandler::processWhisper(Net::MessageIn &msg) const
{
BLOCK_START("ChatHandler::processWhisper")
- const int chatMsgLength = msg.readInt16() - 28;
- std::string nick = msg.readString(24);
+ const int chatMsgLength = msg.readInt16("len") - 28;
+ std::string nick = msg.readString(24, "message");
if (chatMsgLength <= 0)
{
@@ -273,8 +273,8 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg) const
BLOCK_START("ChatHandler::processBeingChat")
const bool channels = msg.getId() == SMSG_BEING_CHAT2;
- int chatMsgLength = msg.readInt16() - 8;
- Being *const being = actorManager->findBeing(msg.readInt32());
+ int chatMsgLength = msg.readInt16("len") - 8;
+ Being *const being = actorManager->findBeing(msg.readInt32("being id"));
if (!being)
{
BLOCK_END("ChatHandler::processBeingChat")
@@ -285,9 +285,9 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg) const
if (channels)
{
chatMsgLength -= 3;
- channel = msg.readUInt8();
- channel += msg.readUInt8();
- channel += msg.readUInt8();
+ channel = msg.readUInt8("channel byte 0");
+ channel += msg.readUInt8("channel byte 1");
+ channel += msg.readUInt8("channel byte 2");
}
if (chatMsgLength <= 0)
@@ -296,7 +296,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg) const
return;
}
- std::string chatMsg = msg.readRawString(chatMsgLength);
+ std::string chatMsg = msg.readRawString(chatMsgLength, "message");
if (being->getType() == ActorType::PLAYER)
being->setTalkTime();
@@ -349,7 +349,7 @@ void ChatHandler::processMVP(Net::MessageIn &msg) const
{
BLOCK_START("ChatHandler::processMVP")
// Display MVP player
- const int id = msg.readInt32(); // id
+ const int id = msg.readInt32("being id");
if (localChatTab && actorManager && config.getBoolValue("showMVP"))
{
const Being *const being = actorManager->findBeing(id);
@@ -364,8 +364,8 @@ void ChatHandler::processMVP(Net::MessageIn &msg) const
void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg) const
{
BLOCK_START("ChatHandler::processIgnoreAllResponse")
- const uint8_t action = msg.readUInt8();
- const uint8_t fail = msg.readUInt8();
+ const uint8_t action = msg.readUInt8("action");
+ const uint8_t fail = msg.readUInt8("result");
if (!localChatTab)
{
BLOCK_END("ChatHandler::processIgnoreAllResponse")