summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-06 21:24:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-06 23:40:01 +0300
commitc623250fbc8524a1ab78791595bf1fc4344fec49 (patch)
treea0a0fb07bf5de4e494d50b214418b1ec99787dce /src/net
parentff516ba3e0459cce11d6b43d4686a1c3c43a6605 (diff)
downloadplus-c623250fbc8524a1ab78791595bf1fc4344fec49.tar.gz
plus-c623250fbc8524a1ab78791595bf1fc4344fec49.tar.bz2
plus-c623250fbc8524a1ab78791595bf1fc4344fec49.tar.xz
plus-c623250fbc8524a1ab78791595bf1fc4344fec49.zip
read guild position flags.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/guildhandler.cpp16
-rw-r--r--src/net/tmwa/guildhandler.cpp14
2 files changed, 15 insertions, 15 deletions
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 03c5a34ef..2d23eaa16 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -355,12 +355,13 @@ void GuildHandler::checkMaster() const
void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) const
{
- const int guildId = msg.readInt32();
- const int emblem = msg.readInt32();
- const int posMode = msg.readInt32();
- msg.readInt32(); // Unused
- msg.readUInt8(); // Unused
- std::string guildName = msg.readString(24);
+ const int guildId = msg.readInt32("guild id");
+ const int emblem = msg.readInt32("elblem id");
+ PlayerInfo::setGuildPositionFlags(
+ static_cast<GuildPositionFlags::Type>(msg.readInt32("mode")));
+ msg.readUInt8("guild master");
+ msg.readInt32("unused");
+ std::string guildName = msg.readString(24, "guild name");
Guild *const g = Guild::getGuild(static_cast<int16_t>(guildId));
if (!g)
@@ -385,9 +386,6 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) const
localPlayer->setGuild(g);
localPlayer->setGuildName(g->getName());
}
-
- logger->log("Guild position info: %d %d %d %s\n", guildId,
- emblem, posMode, guildName.c_str());
}
} // namespace EAthena
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index 9445a4760..24bb06514 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -342,12 +342,14 @@ void GuildHandler::checkMaster() const
void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) const
{
- const int guildId = msg.readInt32();
- const int emblem = msg.readInt32();
- const int posMode = msg.readInt32();
- msg.readInt32(); // Unused
- msg.readUInt8(); // Unused
- std::string guildName = msg.readString(24);
+ const int guildId = msg.readInt32("guild id");
+ const int emblem = msg.readInt32("emblem");
+ const int posMode = msg.readInt32("position");
+ msg.readInt32("unused");
+ msg.readUInt8("usused");
+ std::string guildName = msg.readString(24, "guild name");
+
+ PlayerInfo::setGuildPositionFlags(GuildPositionFlags::Invite);
Guild *const g = Guild::getGuild(static_cast<int16_t>(guildId));
if (!g)