summaryrefslogtreecommitdiff
path: root/src/net/eathena/mailhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-19 17:33:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-19 17:33:16 +0300
commitb7addc0a9a519cf9dcc3e804d9918ce4934a3e83 (patch)
treeeed5cd349f7e9db512fd1e940ed7b070df1c6a35 /src/net/eathena/mailhandler.cpp
parent403792db7d005066273bcbe138afcd1a98b3144c (diff)
downloadplus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.gz
plus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.bz2
plus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.xz
plus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.zip
Add comments for all output packets header.
Diffstat (limited to 'src/net/eathena/mailhandler.cpp')
-rw-r--r--src/net/eathena/mailhandler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index af7a07e7b..00fa5fac5 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -78,44 +78,44 @@ void MailHandler::processMailOpen(Net::MessageIn &msg) const
void MailHandler::refresh()
{
- MessageOut outMsg(CMSG_MAIL_REFRESH_INBOX);
+ createOutPacket(CMSG_MAIL_REFRESH_INBOX);
}
void MailHandler::readMessage(const int msgId)
{
- MessageOut outMsg(CMSG_MAIL_READ_MESSAGE);
+ createOutPacket(CMSG_MAIL_READ_MESSAGE);
outMsg.writeInt32(msgId, "message id");
}
void MailHandler::getAttach(const int msgId)
{
- MessageOut outMsg(CMSG_MAIL_GET_ATTACH);
+ createOutPacket(CMSG_MAIL_GET_ATTACH);
outMsg.writeInt32(msgId, "message id");
}
void MailHandler::deleteMessage(const int msgId)
{
- MessageOut outMsg(CMSG_MAIL_DELETE_MESSAGE);
+ createOutPacket(CMSG_MAIL_DELETE_MESSAGE);
outMsg.writeInt32(msgId, "message id");
}
void MailHandler::returnMessage(const int msgId)
{
- MessageOut outMsg(CMSG_MAIL_RETURN_MESSAGE);
+ createOutPacket(CMSG_MAIL_RETURN_MESSAGE);
outMsg.writeInt32(msgId, "message id");
outMsg.writeString("", 24, "unused");
}
void MailHandler::setAttach(const int index, const int amount)
{
- MessageOut outMsg(CMSG_MAIL_SET_ATTACH);
+ createOutPacket(CMSG_MAIL_SET_ATTACH);
outMsg.writeInt16(static_cast<int16_t>(index + INVENTORY_OFFSET), "index");
outMsg.writeInt32(amount, "amount");
}
void MailHandler::resetAttach(const int flag)
{
- MessageOut outMsg(CMSG_MAIL_RESET_ATTACH);
+ createOutPacket(CMSG_MAIL_RESET_ATTACH);
outMsg.writeInt16(static_cast<int16_t>(flag), "flag");
}
@@ -127,7 +127,7 @@ void MailHandler::send(const std::string &name,
message = message.substr(0, 255);
const int sz = static_cast<int>(message.size());
- MessageOut outMsg(CMSG_MAIL_SEND);
+ createOutPacket(CMSG_MAIL_SEND);
outMsg.writeInt16(69 + sz);
outMsg.writeString(name, 24, "name");
outMsg.writeString(title, 40, "title");