From 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 14:30:20 +0300 Subject: Add strong typed int type BeingId. --- src/net/tmwa/guildhandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/net/tmwa/guildhandler.cpp') 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) -- cgit v1.2.3-60-g2f50