From 726a46299e2efb1e010fa8524dba19871a0c6294 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 Oct 2014 16:26:44 +0300 Subject: Move processGuildExpulsionList from ea namespace into eathena and tmwa. --- src/net/ea/guildhandler.cpp | 16 ---------------- src/net/ea/guildhandler.h | 2 -- src/net/eathena/guildhandler.cpp | 16 ++++++++++++++++ src/net/eathena/guildhandler.h | 2 ++ src/net/tmwa/guildhandler.cpp | 16 ++++++++++++++++ src/net/tmwa/guildhandler.h | 2 ++ 6 files changed, 36 insertions(+), 18 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 0cc03d805..234ad4933 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -448,22 +448,6 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) const } } -void GuildHandler::processGuildExpulsionList(Net::MessageIn &msg) const -{ - const int length = msg.readInt16(); - if (length < 4) - return; - - const int count = (length - 4) / 88; - - for (int i = 0; i < count; i++) - { - msg.readString(24); // Name (of expulsed?) - msg.readString(24); // 'Acc' (name of expulser?) - msg.readString(24); // Message - } -} - void GuildHandler::processGuildMessage(Net::MessageIn &msg) const { const int msgLength = msg.readInt16() - 4; diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index 2bfa4c4a2..3c7446605 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -81,8 +81,6 @@ class GuildHandler notfinal : public Net::GuildHandler virtual void processGuildLeave(Net::MessageIn &msg) const; - virtual void processGuildExpulsionList(Net::MessageIn &msg) const; - virtual void processGuildMessage(Net::MessageIn &msg) const; virtual void processGuildSkillUp(Net::MessageIn &msg) const; diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 8beedbedd..63d88c624 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -427,4 +427,20 @@ void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const processGuildExpulsionContinue(nick); } +void GuildHandler::processGuildExpulsionList(Net::MessageIn &msg) const +{ + const int length = msg.readInt16(); + if (length < 4) + return; + + const int count = (length - 4) / 88; + + for (int i = 0; i < count; i++) + { + msg.readString(24); // Name (of expulsed?) + msg.readString(24); // 'Acc' (name of expulser?) + msg.readString(24); // Message + } +} + } // namespace EAthena diff --git a/src/net/eathena/guildhandler.h b/src/net/eathena/guildhandler.h index 7370da44e..af070a3e3 100644 --- a/src/net/eathena/guildhandler.h +++ b/src/net/eathena/guildhandler.h @@ -81,6 +81,8 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void processGuildMemberLogin(Net::MessageIn &msg) const; void processGuildExpulsion(Net::MessageIn &msg) const; + + void processGuildExpulsionList(Net::MessageIn &msg) const; }; // extern Ea::GuildTab *guildTab; diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp index ec7c9541a..0c1757f86 100644 --- a/src/net/tmwa/guildhandler.cpp +++ b/src/net/tmwa/guildhandler.cpp @@ -414,4 +414,20 @@ void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const processGuildExpulsionContinue(nick); } +void GuildHandler::processGuildExpulsionList(Net::MessageIn &msg) const +{ + const int length = msg.readInt16("len"); + if (length < 4) + return; + + const int count = (length - 4) / 88; + + for (int i = 0; i < count; i++) + { + msg.readString(24, "name of expulsed"); + msg.readString(24, "name of expluser"); + msg.readString(24, "message"); + } +} + } // namespace TmwAthena diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h index acc32e70b..35f10bbbf 100644 --- a/src/net/tmwa/guildhandler.h +++ b/src/net/tmwa/guildhandler.h @@ -79,6 +79,8 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void processGuildMemberLogin(Net::MessageIn &msg) const; void processGuildExpulsion(Net::MessageIn &msg) const; + + void processGuildExpulsionList(Net::MessageIn &msg) const; }; extern Ea::GuildTab *guildTab; -- cgit v1.2.3-70-g09d2