summaryrefslogtreecommitdiff
path: root/src/net/tmwa/guildhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
commit0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch)
tree6259593b8436178ad8d981a96a8fd71eab9e04cc /src/net/tmwa/guildhandler.cpp
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadmv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/net/tmwa/guildhandler.cpp')
-rw-r--r--src/net/tmwa/guildhandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index f58f873a4..c552cfaef 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -222,7 +222,7 @@ void GuildHandler::invite(const std::string &name) const
if (being)
{
createOutPacket(CMSG_GUILD_INVITE);
- outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeBeingId(being->getId(), "account id");
outMsg.writeInt32(0, "unused");
outMsg.writeInt32(0, "unused");
}
@@ -234,7 +234,7 @@ void GuildHandler::invite(const Being *const being) const
return;
createOutPacket(CMSG_GUILD_INVITE);
- outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeBeingId(being->getId(), "account id");
outMsg.writeInt32(0, "unused");
outMsg.writeInt32(0, "unused");
}
@@ -255,7 +255,7 @@ void GuildHandler::leave(const int guildId) const
createOutPacket(CMSG_GUILD_LEAVE);
outMsg.writeInt32(guildId, "guild id");
- outMsg.writeInt32(localPlayer->getId(), "account id");
+ outMsg.writeBeingId(localPlayer->getId(), "account id");
outMsg.writeInt32(PlayerInfo::getCharId(), "char id");
outMsg.writeString("", 40, "message");
}
@@ -268,7 +268,7 @@ void GuildHandler::kick(const GuildMember *restrict const member,
createOutPacket(CMSG_GUILD_EXPULSION);
outMsg.writeInt32(member->getGuild()->getId(), "guild id");
- outMsg.writeInt32(member->getID(), "account id");
+ outMsg.writeBeingId(member->getID(), "account id");
outMsg.writeInt32(member->getCharId(), "char id");
outMsg.writeString(reason, 40, "message");
}
@@ -318,7 +318,7 @@ void GuildHandler::changeMemberPostion(const GuildMember *const member,
createOutPacket(CMSG_GUILD_CHANGE_MEMBER_POS);
outMsg.writeInt16(16, "len");
- outMsg.writeInt32(member->getID(), "account id");
+ outMsg.writeBeingId(member->getID(), "account id");
outMsg.writeInt32(member->getCharId(), "char id");
outMsg.writeInt32(level, "position");
}
@@ -379,7 +379,7 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg)
void GuildHandler::processGuildMemberLogin(Net::MessageIn &msg)
{
- const int accountId = msg.readInt32("account id");
+ const BeingId accountId = msg.readBeingId("account id");
const int charId = msg.readInt32("char id");
const int online = msg.readInt32("flag");
if (Ea::taGuild)