summaryrefslogtreecommitdiff
path: root/src/net/eathena/mail2handler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-12 00:22:38 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-12 00:22:38 +0300
commit21cdd2c1dfd1763fcbf93830c3d463b69ea5bbeb (patch)
treefe69bae2c36bb13efd57aa7a487fd744ad4d7949 /src/net/eathena/mail2handler.cpp
parent59dc7219d3b8491fdd139183cf09742787e407db (diff)
downloadplus-21cdd2c1dfd1763fcbf93830c3d463b69ea5bbeb.tar.gz
plus-21cdd2c1dfd1763fcbf93830c3d463b69ea5bbeb.tar.bz2
plus-21cdd2c1dfd1763fcbf93830c3d463b69ea5bbeb.tar.xz
plus-21cdd2c1dfd1763fcbf93830c3d463b69ea5bbeb.zip
Add MailOpenType enum for different open types.
Diffstat (limited to 'src/net/eathena/mail2handler.cpp')
-rw-r--r--src/net/eathena/mail2handler.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index a4a35b4c2..39f3123f0 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -126,7 +126,7 @@ void Mail2Handler::sendMail(const std::string &to,
outMsg.writeString(body, bodySz, "body");
}
-void Mail2Handler::nextPage(const int openType,
+void Mail2Handler::nextPage(const MailOpenTypeT openType,
const int64_t mailId) const
{
if (packetVersion < 20131218 ||
@@ -135,11 +135,11 @@ void Mail2Handler::nextPage(const int openType,
return;
}
createOutPacket(CMSG_MAIL2_NEXT_PAGE);
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
outMsg.writeInt64(mailId, "mail id");
}
-void Mail2Handler::readMail(const int openType,
+void Mail2Handler::readMail(const MailOpenTypeT openType,
const int64_t mailId) const
{
if (packetVersion < 20131223 ||
@@ -148,11 +148,11 @@ void Mail2Handler::readMail(const int openType,
return;
}
createOutPacket(CMSG_MAIL2_READ_MAIL);
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
outMsg.writeInt64(mailId, "mail id");
}
-void Mail2Handler::deleteMail(const int openType,
+void Mail2Handler::deleteMail(const MailOpenTypeT openType,
const int64_t mailId) const
{
if (packetVersion < 20131218 ||
@@ -161,11 +161,11 @@ void Mail2Handler::deleteMail(const int openType,
return;
}
createOutPacket(CMSG_MAIL2_DELETE_MAIL);
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
outMsg.writeInt64(mailId, "mail id");
}
-void Mail2Handler::requestMoney(const int openType,
+void Mail2Handler::requestMoney(const MailOpenTypeT openType,
const int64_t mailId) const
{
if (packetVersion < 20140326 ||
@@ -175,10 +175,10 @@ void Mail2Handler::requestMoney(const int openType,
}
createOutPacket(CMSG_MAIL2_REQUEST_MONEY);
outMsg.writeInt64(mailId, "mail id");
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
}
-void Mail2Handler::requestItems(const int openType,
+void Mail2Handler::requestItems(const MailOpenTypeT openType,
const int64_t mailId) const
{
if (packetVersion < 20140326 ||
@@ -188,10 +188,10 @@ void Mail2Handler::requestItems(const int openType,
}
createOutPacket(CMSG_MAIL2_REQUEST_ITEMS);
outMsg.writeInt64(mailId, "mail id");
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
}
-void Mail2Handler::refreshMailList(const int openType,
+void Mail2Handler::refreshMailList(const MailOpenTypeT openType,
const int64_t mailId) const
{
if (packetVersion < 20131218 ||
@@ -200,11 +200,11 @@ void Mail2Handler::refreshMailList(const int openType,
return;
}
createOutPacket(CMSG_MAIL2_REFRESH_MAIL_LIST);
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
outMsg.writeInt64(mailId, "mail id");
}
-void Mail2Handler::openMailBox(const int openType) const
+void Mail2Handler::openMailBox(const MailOpenTypeT openType) const
{
if (packetVersion < 20140212 ||
(serverVersion < 19 && serverVersion != 0))
@@ -212,7 +212,7 @@ void Mail2Handler::openMailBox(const int openType) const
return;
}
createOutPacket(CMSG_MAIL2_OPEN_MAILBOX);
- outMsg.writeInt8(openType, "open type");
+ outMsg.writeInt8(toInt(openType, int8_t), "open type");
outMsg.writeInt64(0, "mail id");
}