summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-23 23:52:30 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-23 23:52:30 +0300
commitfa48bfe7dd7ee05c4f7c9142142548e7fda8f05e (patch)
tree95006a9b2fd70cd0151bb00454ca7b6b6f7f6fd9 /src/net/eathena
parentca342d3fbdc5796c80452bd0a1abbe1ecc7937f0 (diff)
downloadplus-fa48bfe7dd7ee05c4f7c9142142548e7fda8f05e.tar.gz
plus-fa48bfe7dd7ee05c4f7c9142142548e7fda8f05e.tar.bz2
plus-fa48bfe7dd7ee05c4f7c9142142548e7fda8f05e.tar.xz
plus-fa48bfe7dd7ee05c4f7c9142142548e7fda8f05e.zip
Add packet fields comments in guildhandler.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/guildhandler.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 841ab95cd..552165ba6 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -219,8 +219,8 @@ void GuildHandler::processGuildUpdateCoords(Net::MessageIn &msg)
void GuildHandler::create(const std::string &name) const
{
createOutPacket(CMSG_GUILD_CREATE);
- outMsg.writeInt32(0); // unused
- outMsg.writeString(name, 24);
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeString(name, 24, "guild name");
}
void GuildHandler::invite(const int guildId A_UNUSED,
@@ -234,9 +234,9 @@ void GuildHandler::invite(const int guildId A_UNUSED,
if (being)
{
createOutPacket(CMSG_GUILD_INVITE);
- outMsg.writeInt32(being->getId());
- outMsg.writeInt32(0); // unused
- outMsg.writeInt32(0); // unused
+ outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
}
}
@@ -247,19 +247,19 @@ void GuildHandler::invite(const int guildId A_UNUSED,
return;
createOutPacket(CMSG_GUILD_INVITE);
- outMsg.writeInt32(being->getId());
- outMsg.writeInt32(0); // unused
- outMsg.writeInt32(0); // unused
+ outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeInt32(0, "unused");
+ outMsg.writeInt32(0, "unused");
}
void GuildHandler::inviteResponse(const int guildId,
const bool response) const
{
createOutPacket(CMSG_GUILD_INVITE_REPLY);
- outMsg.writeInt32(guildId);
- outMsg.writeInt8(response);
- outMsg.writeInt8(0); // unused
- outMsg.writeInt16(0); // unused
+ outMsg.writeInt32(guildId, "guild id");
+ outMsg.writeInt8(response, "response");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeInt16(0, "unused");
}
void GuildHandler::leave(const int guildId) const
@@ -268,10 +268,10 @@ void GuildHandler::leave(const int guildId) const
return;
createOutPacket(CMSG_GUILD_LEAVE);
- outMsg.writeInt32(guildId);
- outMsg.writeInt32(localPlayer->getId()); // Account ID
- outMsg.writeInt32(PlayerInfo::getCharId()); // Char ID
- outMsg.writeString("", 40); // Message
+ outMsg.writeInt32(guildId, "guild id");
+ outMsg.writeInt32(localPlayer->getId(), "account id");
+ outMsg.writeInt32(PlayerInfo::getCharId(), "char id");
+ outMsg.writeString("", 40, "message");
}
void GuildHandler::kick(const GuildMember *restrict const member,
@@ -281,10 +281,10 @@ void GuildHandler::kick(const GuildMember *restrict const member,
return;
createOutPacket(CMSG_GUILD_EXPULSION);
- outMsg.writeInt32(member->getGuild()->getId());
- outMsg.writeInt32(member->getID()); // Account ID
- outMsg.writeInt32(member->getCharId()); // Char ID
- outMsg.writeString(reason, 40); // Message
+ outMsg.writeInt32(member->getGuild()->getId(), "guild id");
+ outMsg.writeInt32(member->getID(), "account id");
+ outMsg.writeInt32(member->getCharId(), "char id");
+ outMsg.writeString(reason, 40, "message");
}
void GuildHandler::chat(const int guildId A_UNUSED,
@@ -296,8 +296,8 @@ void GuildHandler::chat(const int guildId A_UNUSED,
const std::string str = std::string(localPlayer->getName()).append(
" : ").append(text);
createOutPacket(CMSG_GUILD_MESSAGE);
- outMsg.writeInt16(static_cast<uint16_t>(str.size() + 4 + 1));
- outMsg.writeString(str, static_cast<int>(str.length()));
+ outMsg.writeInt16(static_cast<uint16_t>(str.size() + 4 + 1), "len");
+ outMsg.writeString(str, static_cast<int>(str.length()), "message");
outMsg.writeInt8(0);
}
@@ -310,7 +310,7 @@ void GuildHandler::memberList(const int guildId A_UNUSED) const
// 4 = expulsion list
createOutPacket(CMSG_GUILD_REQUEST_INFO);
- outMsg.writeInt32(1); // Request member list
+ outMsg.writeInt32(1, "action"); // Request member list
}
void GuildHandler::info(const int guildId A_UNUSED)
@@ -323,7 +323,7 @@ void GuildHandler::info(const int guildId A_UNUSED)
showBasicInfo = true;
createOutPacket(CMSG_GUILD_REQUEST_INFO);
- outMsg.writeInt32(0); // Request basic info
+ outMsg.writeInt32(0, "action"); // Request basic info
}
void GuildHandler::changeMemberPostion(const GuildMember *const member,
@@ -333,10 +333,10 @@ void GuildHandler::changeMemberPostion(const GuildMember *const member,
return;
createOutPacket(CMSG_GUILD_CHANGE_MEMBER_POS);
- outMsg.writeInt16(16); // size less then 16 <= 4 + 12
- outMsg.writeInt32(member->getID()); // Account ID
- outMsg.writeInt32(member->getCharId()); // Char ID
- outMsg.writeInt32(level); // pos
+ outMsg.writeInt16(16, "len");
+ outMsg.writeInt32(member->getID(), "account id");
+ outMsg.writeInt32(member->getCharId(), "char id");
+ outMsg.writeInt32(level, "pos");
}
void GuildHandler::changeNotice(const int guildId,
@@ -344,9 +344,9 @@ void GuildHandler::changeNotice(const int guildId,
const std::string &restrict msg2) const
{
createOutPacket(CMSG_GUILD_CHANGE_NOTICE);
- outMsg.writeInt32(guildId);
- outMsg.writeString(msg1, 60); // msg1
- outMsg.writeString(msg2, 120); // msg2
+ outMsg.writeInt32(guildId, "guild id");
+ outMsg.writeString(msg1, 60, "msg1");
+ outMsg.writeString(msg2, 120, "msg2");
}
void GuildHandler::checkMaster() const