summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-21 19:35:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-21 19:35:20 +0300
commit284561a7be192b730fb717ee7903b92a2b1d7dc3 (patch)
tree5c6e7f677aebfe137dcd820e1250fe1e453e6fc2 /src/net/eathena
parentbeb4ebc9d31b17c9bcfcee17d94fe8a71446a5a6 (diff)
downloadmv-284561a7be192b730fb717ee7903b92a2b1d7dc3.tar.gz
mv-284561a7be192b730fb717ee7903b92a2b1d7dc3.tar.bz2
mv-284561a7be192b730fb717ee7903b92a2b1d7dc3.tar.xz
mv-284561a7be192b730fb717ee7903b92a2b1d7dc3.zip
Replace missing MessageOut creation to createOutPacket.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/gamehandler.cpp4
-rw-r--r--src/net/eathena/guildhandler.cpp88
2 files changed, 46 insertions, 46 deletions
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 6caf57c20..3df214464 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -160,8 +160,8 @@ void GameHandler::quit() const
void GameHandler::ping(const int tick) const
{
- MessageOut msg(CMSG_MAP_PING);
- msg.writeInt32(tick, "tick");
+ createOutPacket(CMSG_MAP_PING);
+ outMsg.writeInt32(tick, "tick");
}
void GameHandler::disconnect2() const
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 148195770..841ab95cd 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -218,9 +218,9 @@ void GuildHandler::processGuildUpdateCoords(Net::MessageIn &msg)
void GuildHandler::create(const std::string &name) const
{
- MessageOut msg(CMSG_GUILD_CREATE);
- msg.writeInt32(0); // unused
- msg.writeString(name, 24);
+ createOutPacket(CMSG_GUILD_CREATE);
+ outMsg.writeInt32(0); // unused
+ outMsg.writeString(name, 24);
}
void GuildHandler::invite(const int guildId A_UNUSED,
@@ -233,10 +233,10 @@ void GuildHandler::invite(const int guildId A_UNUSED,
name, ActorType::Player);
if (being)
{
- MessageOut msg(CMSG_GUILD_INVITE);
- msg.writeInt32(being->getId());
- msg.writeInt32(0); // unused
- msg.writeInt32(0); // unused
+ createOutPacket(CMSG_GUILD_INVITE);
+ outMsg.writeInt32(being->getId());
+ outMsg.writeInt32(0); // unused
+ outMsg.writeInt32(0); // unused
}
}
@@ -246,20 +246,20 @@ void GuildHandler::invite(const int guildId A_UNUSED,
if (!being)
return;
- MessageOut msg(CMSG_GUILD_INVITE);
- msg.writeInt32(being->getId());
- msg.writeInt32(0); // unused
- msg.writeInt32(0); // unused
+ createOutPacket(CMSG_GUILD_INVITE);
+ outMsg.writeInt32(being->getId());
+ outMsg.writeInt32(0); // unused
+ outMsg.writeInt32(0); // unused
}
void GuildHandler::inviteResponse(const int guildId,
const bool response) const
{
- MessageOut msg(CMSG_GUILD_INVITE_REPLY);
- msg.writeInt32(guildId);
- msg.writeInt8(response);
- msg.writeInt8(0); // unused
- msg.writeInt16(0); // unused
+ createOutPacket(CMSG_GUILD_INVITE_REPLY);
+ outMsg.writeInt32(guildId);
+ outMsg.writeInt8(response);
+ outMsg.writeInt8(0); // unused
+ outMsg.writeInt16(0); // unused
}
void GuildHandler::leave(const int guildId) const
@@ -267,11 +267,11 @@ void GuildHandler::leave(const int guildId) const
if (!localPlayer)
return;
- MessageOut msg(CMSG_GUILD_LEAVE);
- msg.writeInt32(guildId);
- msg.writeInt32(localPlayer->getId()); // Account ID
- msg.writeInt32(PlayerInfo::getCharId()); // Char ID
- msg.writeString("", 40); // Message
+ createOutPacket(CMSG_GUILD_LEAVE);
+ outMsg.writeInt32(guildId);
+ outMsg.writeInt32(localPlayer->getId()); // Account ID
+ outMsg.writeInt32(PlayerInfo::getCharId()); // Char ID
+ outMsg.writeString("", 40); // Message
}
void GuildHandler::kick(const GuildMember *restrict const member,
@@ -280,11 +280,11 @@ void GuildHandler::kick(const GuildMember *restrict const member,
if (!member || !member->getGuild())
return;
- MessageOut msg(CMSG_GUILD_EXPULSION);
- msg.writeInt32(member->getGuild()->getId());
- msg.writeInt32(member->getID()); // Account ID
- msg.writeInt32(member->getCharId()); // Char ID
- msg.writeString(reason, 40); // Message
+ 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
}
void GuildHandler::chat(const int guildId A_UNUSED,
@@ -295,10 +295,10 @@ void GuildHandler::chat(const int guildId A_UNUSED,
const std::string str = std::string(localPlayer->getName()).append(
" : ").append(text);
- MessageOut msg(CMSG_GUILD_MESSAGE);
- msg.writeInt16(static_cast<uint16_t>(str.size() + 4 + 1));
- msg.writeString(str, static_cast<int>(str.length()));
- msg.writeInt8(0);
+ createOutPacket(CMSG_GUILD_MESSAGE);
+ outMsg.writeInt16(static_cast<uint16_t>(str.size() + 4 + 1));
+ outMsg.writeString(str, static_cast<int>(str.length()));
+ outMsg.writeInt8(0);
}
void GuildHandler::memberList(const int guildId A_UNUSED) const
@@ -309,8 +309,8 @@ void GuildHandler::memberList(const int guildId A_UNUSED) const
// 3 = skill info
// 4 = expulsion list
- MessageOut msg(CMSG_GUILD_REQUEST_INFO);
- msg.writeInt32(1); // Request member list
+ createOutPacket(CMSG_GUILD_REQUEST_INFO);
+ outMsg.writeInt32(1); // Request member list
}
void GuildHandler::info(const int guildId A_UNUSED)
@@ -322,8 +322,8 @@ void GuildHandler::info(const int guildId A_UNUSED)
// 4 = expulsion list
showBasicInfo = true;
- MessageOut msg(CMSG_GUILD_REQUEST_INFO);
- msg.writeInt32(0); // Request basic info
+ createOutPacket(CMSG_GUILD_REQUEST_INFO);
+ outMsg.writeInt32(0); // Request basic info
}
void GuildHandler::changeMemberPostion(const GuildMember *const member,
@@ -332,26 +332,26 @@ void GuildHandler::changeMemberPostion(const GuildMember *const member,
if (!member || !member->getGuild())
return;
- MessageOut msg(CMSG_GUILD_CHANGE_MEMBER_POS);
- msg.writeInt16(16); // size less then 16 <= 4 + 12
- msg.writeInt32(member->getID()); // Account ID
- msg.writeInt32(member->getCharId()); // Char ID
- msg.writeInt32(level); // pos
+ 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
}
void GuildHandler::changeNotice(const int guildId,
const std::string &restrict msg1,
const std::string &restrict msg2) const
{
- MessageOut msg(CMSG_GUILD_CHANGE_NOTICE);
- msg.writeInt32(guildId);
- msg.writeString(msg1, 60); // msg1
- msg.writeString(msg2, 120); // msg2
+ createOutPacket(CMSG_GUILD_CHANGE_NOTICE);
+ outMsg.writeInt32(guildId);
+ outMsg.writeString(msg1, 60); // msg1
+ outMsg.writeString(msg2, 120); // msg2
}
void GuildHandler::checkMaster() const
{
- MessageOut msg(CMSG_GUILD_CHECK_MASTER);
+ createOutPacket(CMSG_GUILD_CHECK_MASTER);
}
void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg)