diff options
-rw-r--r-- | src/net/ea/guildhandler.cpp | 19 | ||||
-rw-r--r-- | src/net/ea/guildhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.cpp | 20 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/guildhandler.cpp | 20 | ||||
-rw-r--r-- | src/net/tmwa/guildhandler.h | 2 |
6 files changed, 44 insertions, 21 deletions
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 3e43d6400..b36b92c0d 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -105,25 +105,6 @@ void GuildHandler::processGuildCreateResponse(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 (taGuild) - { - GuildMember *const m = taGuild->getMember(accountId, charId); - if (m) - { - m->setOnline(online); - if (guildTab) - guildTab->showOnline(m->getName(), online); - if (socialWindow) - socialWindow->updateGuildCounter(); - } - } -} - void GuildHandler::processGuildMasterOrMember(Net::MessageIn &msg) const { msg.readInt32(); // Type (0x57 for member, 0xd7 for master) diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index ed5453f7d..ee3ce2672 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -53,8 +53,6 @@ class GuildHandler notfinal : public Net::GuildHandler virtual void processGuildCreateResponse(Net::MessageIn &msg) const; - virtual void processGuildMemberLogin(Net::MessageIn &msg) const; - virtual void processGuildMasterOrMember(Net::MessageIn &msg) const; virtual void processGuildBasicInfo(Net::MessageIn &msg); 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; 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; |