From b7addc0a9a519cf9dcc3e804d9918ce4934a3e83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 17:33:16 +0300 Subject: Add comments for all output packets header. --- src/net/tmwa/partyhandler.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/net/tmwa/partyhandler.cpp') 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(text.length() + 4)); outMsg.writeString(text, static_cast(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(share)); outMsg.writeInt16(static_cast(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(mShareExp)); outMsg.writeInt16(static_cast(share)); } -- cgit v1.2.3-70-g09d2