diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-19 17:33:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-19 17:33:16 +0300 |
commit | b7addc0a9a519cf9dcc3e804d9918ce4934a3e83 (patch) | |
tree | eed5cd349f7e9db512fd1e940ed7b070df1c6a35 /src/net/tmwa/partyhandler.cpp | |
parent | 403792db7d005066273bcbe138afcd1a98b3144c (diff) | |
download | manaplus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.gz manaplus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.bz2 manaplus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.xz manaplus-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.zip |
Add comments for all output packets header.
Diffstat (limited to 'src/net/tmwa/partyhandler.cpp')
-rw-r--r-- | src/net/tmwa/partyhandler.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 701fb9bff..6d59cd0ce 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -114,7 +114,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg) void PartyHandler::create(const std::string &name) const { - MessageOut outMsg(CMSG_PARTY_CREATE); + createOutPacket(CMSG_PARTY_CREATE); outMsg.writeString(name.substr(0, 23), 24); } @@ -127,7 +127,7 @@ void PartyHandler::invite(const std::string &name) const name, ActorType::Player); if (being) { - MessageOut outMsg(CMSG_PARTY_INVITE); + createOutPacket(CMSG_PARTY_INVITE); outMsg.writeInt32(being->getId()); } } @@ -137,7 +137,7 @@ void PartyHandler::inviteResponse(const std::string &inviter A_UNUSED, { if (localPlayer) { - MessageOut outMsg(CMSG_PARTY_INVITED); + createOutPacket(CMSG_PARTY_INVITED); outMsg.writeInt32(localPlayer->getId()); outMsg.writeInt32(accept ? 1 : 0); } @@ -145,14 +145,14 @@ void PartyHandler::inviteResponse(const std::string &inviter A_UNUSED, void PartyHandler::leave() const { - MessageOut outMsg(CMSG_PARTY_LEAVE); + createOutPacket(CMSG_PARTY_LEAVE); } void PartyHandler::kick(const Being *const being) const { if (being) { - MessageOut outMsg(CMSG_PARTY_KICK); + createOutPacket(CMSG_PARTY_KICK); outMsg.writeInt32(being->getId()); outMsg.writeString("", 24); // unused } @@ -170,14 +170,14 @@ void PartyHandler::kick(const std::string &name) const return; } - MessageOut outMsg(CMSG_PARTY_KICK); + createOutPacket(CMSG_PARTY_KICK); outMsg.writeInt32(m->getID()); outMsg.writeString(name, 24); // unused } void PartyHandler::chat(const std::string &text) const { - MessageOut outMsg(CMSG_PARTY_MESSAGE); + createOutPacket(CMSG_PARTY_MESSAGE); outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); outMsg.writeString(text, static_cast<int>(text.length())); } @@ -187,7 +187,7 @@ void PartyHandler::setShareExperience(const Net::PartyShare::Type share) const if (share == Net::PartyShare::NOT_POSSIBLE) return; - MessageOut outMsg(CMSG_PARTY_SETTINGS); + createOutPacket(CMSG_PARTY_SETTINGS); outMsg.writeInt16(static_cast<int16_t>(share)); outMsg.writeInt16(static_cast<int16_t>(mShareItems)); } @@ -197,7 +197,7 @@ void PartyHandler::setShareItems(const Net::PartyShare::Type share) const if (share == Net::PartyShare::NOT_POSSIBLE) return; - MessageOut outMsg(CMSG_PARTY_SETTINGS); + createOutPacket(CMSG_PARTY_SETTINGS); outMsg.writeInt16(static_cast<int16_t>(mShareExp)); outMsg.writeInt16(static_cast<int16_t>(share)); } |