diff options
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/guildhandler.cpp | 20 | ||||
-rw-r--r-- | src/net/tmwa/guildhandler.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp index 24bb06514..8226bea3f 100644 --- a/src/net/tmwa/guildhandler.cpp +++ b/src/net/tmwa/guildhandler.cpp @@ -28,6 +28,7 @@ #include "being/playerinfo.h" #include "gui/windows/chatwindow.h" +#include "gui/windows/socialwindow.h" #include "net/serverfeatures.h" @@ -379,4 +380,23 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) const emblem, posMode, guildName.c_str()); } +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 TmwAthena diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h index b92513919..a7f32c9c6 100644 --- a/src/net/tmwa/guildhandler.h +++ b/src/net/tmwa/guildhandler.h @@ -75,6 +75,8 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler protected: void processGuildPositionInfo(Net::MessageIn &msg) const; + + void processGuildMemberLogin(Net::MessageIn &msg) const; }; extern Ea::GuildTab *guildTab; |