summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/familyhandler.cpp57
-rw-r--r--src/net/eathena/familyhandler.h45
-rw-r--r--src/net/eathena/generalhandler.cpp5
-rw-r--r--src/net/eathena/generalhandler.h1
4 files changed, 107 insertions, 1 deletions
diff --git a/src/net/eathena/familyhandler.cpp b/src/net/eathena/familyhandler.cpp
new file mode 100644
index 000000000..76b31ba3d
--- /dev/null
+++ b/src/net/eathena/familyhandler.cpp
@@ -0,0 +1,57 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "net/eathena/familyhandler.h"
+
+#include "logger.h"
+
+#include "net/ea/eaprotocol.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocol.h"
+
+#include "debug.h"
+
+extern Net::FamilyHandler *familyHandler;
+
+namespace EAthena
+{
+
+FamilyHandler::FamilyHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ familyHandler = this;
+}
+
+void FamilyHandler::handleMessage(Net::MessageIn &msg)
+{
+ switch (msg.getId())
+ {
+ default:
+ break;
+ }
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/familyhandler.h b/src/net/eathena/familyhandler.h
new file mode 100644
index 000000000..2a1e0d907
--- /dev/null
+++ b/src/net/eathena/familyhandler.h
@@ -0,0 +1,45 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2011-2014 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_EATHENA_FAMILYHANDLER_H
+#define NET_EATHENA_FAMILYHANDLER_H
+
+#include "net/familyhandler.h"
+
+#include "net/eathena/messagehandler.h"
+
+namespace EAthena
+{
+class MessageOut;
+
+class FamilyHandler final : public MessageHandler,
+ public Net::FamilyHandler
+{
+ public:
+ FamilyHandler();
+
+ A_DELETE_COPY(FamilyHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_FAMILYHANDLER_H
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 72b2d74b0..a6c6b7bca 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -46,6 +46,7 @@
#include "net/eathena/cashshophandler.h"
#include "net/eathena/chathandler.h"
#include "net/eathena/charserverhandler.h"
+#include "net/eathena/familyhandler.h"
#include "net/eathena/gamehandler.h"
#include "net/eathena/guildhandler.h"
#include "net/eathena/inventoryhandler.h"
@@ -100,7 +101,8 @@ GeneralHandler::GeneralHandler() :
mServerFeatures(new ServerFeatures),
mMailHandler(new MailHandler),
mAuctionHandler(new AuctionHandler),
- mCashShopHandler(new CashShopHandler)
+ mCashShopHandler(new CashShopHandler),
+ mFamilyHandler(new FamilyHandler)
{
static const uint16_t _messages[] =
{
@@ -201,6 +203,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mMailHandler.get());
mNetwork->registerHandler(mAuctionHandler.get());
mNetwork->registerHandler(mCashShopHandler.get());
+ mNetwork->registerHandler(mFamilyHandler.get());
}
void GeneralHandler::reload()
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index aed157d9b..20e048cfe 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -82,6 +82,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mMailHandler;
MessageHandlerPtr mAuctionHandler;
MessageHandlerPtr mCashShopHandler;
+ MessageHandlerPtr mFamilyHandler;
};
} // namespace EAthena