summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/elementalhandler.cpp50
-rw-r--r--src/net/eathena/elementalhandler.h43
-rw-r--r--src/net/eathena/generalhandler.cpp5
-rw-r--r--src/net/eathena/generalhandler.h1
4 files changed, 98 insertions, 1 deletions
diff --git a/src/net/eathena/elementalhandler.cpp b/src/net/eathena/elementalhandler.cpp
new file mode 100644
index 000000000..9e4f77c0c
--- /dev/null
+++ b/src/net/eathena/elementalhandler.cpp
@@ -0,0 +1,50 @@
+/*
+ * 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/elementalhandler.h"
+
+#include "debug.h"
+
+extern Net::ElementalHandler *elementalHandler;
+
+namespace EAthena
+{
+
+ElementalHandler::ElementalHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ elementalHandler = this;
+}
+
+void ElementalHandler::handleMessage(Net::MessageIn &msg)
+{
+ switch (msg.getId())
+ {
+ default:
+ break;
+ }
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/elementalhandler.h b/src/net/eathena/elementalhandler.h
new file mode 100644
index 000000000..13f4d259b
--- /dev/null
+++ b/src/net/eathena/elementalhandler.h
@@ -0,0 +1,43 @@
+/*
+ * 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_ELEMENTALHANDLER_H
+#define NET_EATHENA_ELEMENTALHANDLER_H
+
+#include "net/elementalhandler.h"
+
+#include "net/eathena/messagehandler.h"
+
+namespace EAthena
+{
+class ElementalHandler final : public MessageHandler,
+ public Net::ElementalHandler
+{
+ public:
+ ElementalHandler();
+
+ A_DELETE_COPY(ElementalHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_ELEMENTALHANDLER_H
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 04755c478..c5730556a 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -47,6 +47,7 @@
#include "net/eathena/cashshophandler.h"
#include "net/eathena/chathandler.h"
#include "net/eathena/charserverhandler.h"
+#include "net/eathena/elementalhandler.h"
#include "net/eathena/familyhandler.h"
#include "net/eathena/friendshandler.h"
#include "net/eathena/gamehandler.h"
@@ -111,7 +112,8 @@ GeneralHandler::GeneralHandler() :
mMercenaryHandler(new MercenaryHandler),
mBuyingStoreHandler(new BuyingStoreHandler),
mHomunculusHandler(new HomunculusHandler),
- mFriendsHandler(new FriendsHandler)
+ mFriendsHandler(new FriendsHandler),
+ mElementalHandler(new ElementalHandler)
{
static const uint16_t _messages[] =
{
@@ -285,6 +287,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mBuyingStoreHandler);
mNetwork->registerHandler(mHomunculusHandler);
mNetwork->registerHandler(mFriendsHandler);
+ mNetwork->registerHandler(mElementalHandler);
}
void GeneralHandler::reload()
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 5ab20c616..154c48d46 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -90,6 +90,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mBuyingStoreHandler;
MessageHandlerPtr mHomunculusHandler;
MessageHandlerPtr mFriendsHandler;
+ MessageHandlerPtr mElementalHandler;
};
} // namespace EAthena