summaryrefslogtreecommitdiff
path: root/src/net/eathena/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/eathena/guildhandler.cpp
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/net/eathena/guildhandler.cpp')
-rw-r--r--src/net/eathena/guildhandler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 1a6c29b80..85609581b 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -210,7 +210,7 @@ void GuildHandler::handleMessage(Net::MessageIn &msg)
void GuildHandler::processGuildUpdateCoords(Net::MessageIn &msg)
{
- const int id = msg.readInt32("account id");
+ const BeingId id = msg.readBeingId("account id");
const int x = msg.readInt16("x");
const int y = msg.readInt16("y");
if (Ea::taGuild)
@@ -241,7 +241,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");
}
@@ -253,7 +253,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");
}
@@ -275,7 +275,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");
}
@@ -288,7 +288,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");
}
@@ -339,7 +339,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, "pos");
}
@@ -396,7 +396,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");
const Gender::Type gender = Being::intToGender(static_cast<uint8_t>(
@@ -445,7 +445,7 @@ void GuildHandler::processGuildExpulsionList(Net::MessageIn &msg)
void GuildHandler::processGuildEmblem(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
- msg.readInt32("being id");
+ msg.readBeingId("being id");
msg.readInt32("guild id");
msg.readInt16("emblem id");
}
@@ -456,7 +456,7 @@ void GuildHandler::requestAlliance(const Being *const being) const
return;
createOutPacket(CMSG_GUILD_ALLIANCE_REQUEST);
- outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeBeingId(being->getId(), "account id");
outMsg.writeInt32(0, "inviter account id");
outMsg.writeInt32(0, "inviter char id");
}
@@ -498,7 +498,7 @@ void GuildHandler::requestOpposition(const Being *const being) const
return;
createOutPacket(CMSG_GUILD_OPPOSITION);
- outMsg.writeInt32(being->getId(), "account id");
+ outMsg.writeBeingId(being->getId(), "account id");
}
void GuildHandler::breakGuild(const std::string &name) const