diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-08 16:29:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-08 16:29:20 +0300 |
commit | ab38f105a42355cbf207bf4da48c0c386892781c (patch) | |
tree | 713b45108c805241fe5714146dfe0aff2bfd2d13 /src/net/eathena | |
parent | f8042d0cf07ebb4b10094ac242591d8edf7067ba (diff) | |
download | mv-ab38f105a42355cbf207bf4da48c0c386892781c.tar.gz mv-ab38f105a42355cbf207bf4da48c0c386892781c.tar.bz2 mv-ab38f105a42355cbf207bf4da48c0c386892781c.tar.xz mv-ab38f105a42355cbf207bf4da48c0c386892781c.zip |
Fix code style.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 3 | ||||
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/mailhandler.h | 18 |
3 files changed, 20 insertions, 19 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 93733d2fa..5ff11ee83 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -1615,7 +1615,8 @@ void BeingHandler::processPlaterStatusChangeNoTick(Net::MessageIn &msg) { const uint16_t status = msg.readInt16("index"); const int id = msg.readInt32("account id"); - const Enable flag = fromBool(msg.readUInt8("state") ? true : false, Enable); + const Enable flag = fromBool(msg.readUInt8("state") + ? true : false, Enable); Being *const dstBeing = actorManager->findBeing(id); if (!dstBeing) diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index e154ad406..0f74e0af2 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -261,51 +261,51 @@ void MailHandler::processMailReturn(Net::MessageIn &msg) } } -void MailHandler::refresh() +void MailHandler::refresh() const { createOutPacket(CMSG_MAIL_REFRESH_INBOX); } -void MailHandler::readMessage(const int msgId) +void MailHandler::readMessage(const int msgId) const { createOutPacket(CMSG_MAIL_READ_MESSAGE); outMsg.writeInt32(msgId, "message id"); } -void MailHandler::getAttach(const int msgId) +void MailHandler::getAttach(const int msgId) const { createOutPacket(CMSG_MAIL_GET_ATTACH); outMsg.writeInt32(msgId, "message id"); } -void MailHandler::deleteMessage(const int msgId) +void MailHandler::deleteMessage(const int msgId) const { createOutPacket(CMSG_MAIL_DELETE_MESSAGE); outMsg.writeInt32(msgId, "message id"); } -void MailHandler::returnMessage(const int msgId) +void MailHandler::returnMessage(const int msgId) const { createOutPacket(CMSG_MAIL_RETURN_MESSAGE); outMsg.writeInt32(msgId, "message id"); outMsg.writeString("", 24, "unused"); } -void MailHandler::setAttach(const int index, const int amount) +void MailHandler::setAttach(const int index, const int amount) const { createOutPacket(CMSG_MAIL_SET_ATTACH); outMsg.writeInt16(static_cast<int16_t>(index + INVENTORY_OFFSET), "index"); outMsg.writeInt32(amount, "amount"); } -void MailHandler::setAttachMoney(const int money) +void MailHandler::setAttachMoney(const int money) const { createOutPacket(CMSG_MAIL_SET_ATTACH); outMsg.writeInt16(static_cast<int16_t>(0), "index"); outMsg.writeInt32(money, "money"); } -void MailHandler::resetAttach(const int flag) +void MailHandler::resetAttach(const int flag) const { createOutPacket(CMSG_MAIL_RESET_ATTACH); outMsg.writeInt16(static_cast<int16_t>(flag), "flag"); @@ -313,7 +313,7 @@ void MailHandler::resetAttach(const int flag) void MailHandler::send(const std::string &name, const std::string &title, - std::string message) + std::string message) const { if (message.size() > 255) message = message.substr(0, 255); diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h index 3b0d17574..88e1e0e25 100644 --- a/src/net/eathena/mailhandler.h +++ b/src/net/eathena/mailhandler.h @@ -38,25 +38,25 @@ class MailHandler final : public MessageHandler, public Net::MailHandler void handleMessage(Net::MessageIn &msg) override final; - void refresh() override final; + void refresh() const override final; - void readMessage(const int msgId) override final; + void readMessage(const int msgId) const override final; - void getAttach(const int msgId) override final; + void getAttach(const int msgId) const override final; - void deleteMessage(const int msgId) override final; + void deleteMessage(const int msgId) const override final; - void returnMessage(const int msgId) override final; + void returnMessage(const int msgId) const override final; - void setAttach(const int index, const int amount) override final; + void setAttach(const int index, const int amount) const override final; - void setAttachMoney(const int money) override final; + void setAttachMoney(const int money) const override final; - void resetAttach(const int flag) override final; + void resetAttach(const int flag) const override final; void send(const std::string &name, const std::string &title, - std::string message) override final; + std::string message) const override final; protected: static void processMailOpen(Net::MessageIn &msg); |