diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/guildhandler.cpp | 20 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 2d23eaa16..3d6fb2d19 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -28,6 +28,7 @@ #include "being/playerinfo.h" #include "gui/windows/chatwindow.h" +#include "gui/windows/socialwindow.h" #include "net/ea/gui/guildtab.h" @@ -388,4 +389,23 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) const } } +void GuildHandler::processGuildMemberLogin(Net::MessageIn &msg) const +{ + const int accountId = msg.readInt32("account id"); + const int charId = msg.readInt32("char id"); + const int online = msg.readInt32("flag"); + if (Ea::taGuild) + { + GuildMember *const m = Ea::taGuild->getMember(accountId, charId); + if (m) + { + m->setOnline(online); + if (Ea::guildTab) + Ea::guildTab->showOnline(m->getName(), online); + if (socialWindow) + socialWindow->updateGuildCounter(); + } + } +} + } // namespace EAthena diff --git a/src/net/eathena/guildhandler.h b/src/net/eathena/guildhandler.h index c9beedc6b..7f8d4ba6a 100644 --- a/src/net/eathena/guildhandler.h +++ b/src/net/eathena/guildhandler.h @@ -77,6 +77,8 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void processGuildUpdateCoords(Net::MessageIn &msg) const; void processGuildPositionInfo(Net::MessageIn &msg) const; + + void processGuildMemberLogin(Net::MessageIn &msg) const; }; // extern Ea::GuildTab *guildTab; |