summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-24 13:26:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-24 13:26:48 +0300
commit054e16e52d633d144b6c11b78e989bb721c59cb2 (patch)
tree703b38d98760273b4b61ca8a951b99c8d82d1484 /src/net
parent0d588890a6cd3cc9034614504ae6f18b6c5f0682 (diff)
downloadplus-054e16e52d633d144b6c11b78e989bb721c59cb2.tar.gz
plus-054e16e52d633d144b6c11b78e989bb721c59cb2.tar.bz2
plus-054e16e52d633d144b6c11b78e989bb721c59cb2.tar.xz
plus-054e16e52d633d144b6c11b78e989bb721c59cb2.zip
Add empty HomunculusHandler.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/generalhandler.cpp5
-rw-r--r--src/net/eathena/generalhandler.h1
-rw-r--r--src/net/eathena/homunculushandler.cpp57
-rw-r--r--src/net/eathena/homunculushandler.h45
-rw-r--r--src/net/homunculushandler.h42
-rw-r--r--src/net/net.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp5
-rw-r--r--src/net/tmwa/generalhandler.h1
-rw-r--r--src/net/tmwa/homunculushandler.cpp45
-rw-r--r--src/net/tmwa/homunculushandler.h44
10 files changed, 245 insertions, 2 deletions
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index dba1ee41e..2b5da81e4 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -51,6 +51,7 @@
#include "net/eathena/familyhandler.h"
#include "net/eathena/gamehandler.h"
#include "net/eathena/guildhandler.h"
+#include "net/eathena/homunculushandler.h"
#include "net/eathena/inventoryhandler.h"
#include "net/eathena/itemhandler.h"
#include "net/eathena/loginhandler.h"
@@ -108,7 +109,8 @@ GeneralHandler::GeneralHandler() :
mFamilyHandler(new FamilyHandler),
mBankHandler(new BankHandler),
mMercenaryHandler(new MercenaryHandler),
- mBuyingStoreHandler(new BuyingStoreHandler)
+ mBuyingStoreHandler(new BuyingStoreHandler),
+ mHomunculusHandler(new HomunculusHandler)
{
static const uint16_t _messages[] =
{
@@ -213,6 +215,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mBankHandler);
mNetwork->registerHandler(mMercenaryHandler);
mNetwork->registerHandler(mBuyingStoreHandler);
+ mNetwork->registerHandler(mHomunculusHandler);
}
void GeneralHandler::reload()
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 56070b247..7f68f5f54 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -86,6 +86,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mBankHandler;
MessageHandlerPtr mMercenaryHandler;
MessageHandlerPtr mBuyingStoreHandler;
+ MessageHandlerPtr mHomunculusHandler;
};
} // namespace EAthena
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp
new file mode 100644
index 000000000..c00025daa
--- /dev/null
+++ b/src/net/eathena/homunculushandler.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/homunculushandler.h"
+
+#include "logger.h"
+
+#include "net/ea/eaprotocol.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocol.h"
+
+#include "debug.h"
+
+extern Net::HomunculusHandler *homunculusHandler;
+
+namespace EAthena
+{
+
+HomunculusHandler::HomunculusHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ homunculusHandler = this;
+}
+
+void HomunculusHandler::handleMessage(Net::MessageIn &msg)
+{
+ switch (msg.getId())
+ {
+ default:
+ break;
+ }
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h
new file mode 100644
index 000000000..9a2e5bd76
--- /dev/null
+++ b/src/net/eathena/homunculushandler.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_HOMUNCULUSHANDLER_H
+#define NET_EATHENA_HOMUNCULUSHANDLER_H
+
+#include "net/homunculushandler.h"
+
+#include "net/eathena/messagehandler.h"
+
+namespace EAthena
+{
+class MessageOut;
+
+class HomunculusHandler final : public MessageHandler,
+ public Net::HomunculusHandler
+{
+ public:
+ HomunculusHandler();
+
+ A_DELETE_COPY(HomunculusHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_HOMUNCULUSHANDLER_H
diff --git a/src/net/homunculushandler.h b/src/net/homunculushandler.h
new file mode 100644
index 000000000..cc1d15b1e
--- /dev/null
+++ b/src/net/homunculushandler.h
@@ -0,0 +1,42 @@
+/*
+ * 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_HOMUNCULUSHANDLER_H
+#define NET_HOMUNCULUSHANDLER_H
+
+#include <string>
+
+#include "localconsts.h"
+
+namespace Net
+{
+
+class HomunculusHandler notfinal
+{
+ public:
+ virtual ~HomunculusHandler()
+ { }
+};
+
+} // namespace Net
+
+extern Net::HomunculusHandler *homunculusHandler;
+
+#endif // NET_HOMUNCULUSHANDLER_H
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 28bdb22a8..3baec6059 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -55,6 +55,7 @@ namespace Net
class GameHandler;
class GeneralHandler;
class GuildHandler;
+ class HomunculusHandler;
class InventoryHandler;
class LoginHandler;
class MailHandler;
@@ -94,6 +95,7 @@ Net::FamilyHandler *familyHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
Net::QuestHandler *questHandler = nullptr;
Net::BuyingStoreHandler *buyingStoreHandler = nullptr;
+Net::HomunculusHandler *homunculusHandler = nullptr;
namespace Net
{
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 9a24d6a4e..bde54c207 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -51,6 +51,7 @@
#include "net/tmwa/familyhandler.h"
#include "net/tmwa/gamehandler.h"
#include "net/tmwa/guildhandler.h"
+#include "net/tmwa/homunculushandler.h"
#include "net/tmwa/inventoryhandler.h"
#include "net/tmwa/itemhandler.h"
#include "net/tmwa/loginhandler.h"
@@ -108,7 +109,8 @@ GeneralHandler::GeneralHandler() :
mFamilyHandler(new FamilyHandler),
mBankHandler(new BankHandler),
mMercenaryHandler(new MercenaryHandler),
- mBuyingStoreHandler(new BuyingStoreHandler)
+ mBuyingStoreHandler(new BuyingStoreHandler),
+ mHomunculusHandler(new HomunculusHandler)
{
static const uint16_t _messages[] =
{
@@ -229,6 +231,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mBankHandler);
mNetwork->registerHandler(mMercenaryHandler);
mNetwork->registerHandler(mBuyingStoreHandler);
+ mNetwork->registerHandler(mHomunculusHandler);
}
void GeneralHandler::reload()
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 83d1f574f..a43d56096 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -86,6 +86,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mBankHandler;
MessageHandlerPtr mMercenaryHandler;
MessageHandlerPtr mBuyingStoreHandler;
+ MessageHandlerPtr mHomunculusHandler;
};
} // namespace TmwAthena
diff --git a/src/net/tmwa/homunculushandler.cpp b/src/net/tmwa/homunculushandler.cpp
new file mode 100644
index 000000000..e9cecc71c
--- /dev/null
+++ b/src/net/tmwa/homunculushandler.cpp
@@ -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/>.
+ */
+
+#include "net/tmwa/homunculushandler.h"
+
+#include "debug.h"
+
+extern Net::HomunculusHandler *homunculusHandler;
+
+namespace TmwAthena
+{
+
+HomunculusHandler::HomunculusHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ homunculusHandler = this;
+}
+
+void HomunculusHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
+{
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/homunculushandler.h b/src/net/tmwa/homunculushandler.h
new file mode 100644
index 000000000..444d4aff9
--- /dev/null
+++ b/src/net/tmwa/homunculushandler.h
@@ -0,0 +1,44 @@
+/*
+ * 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_TMWA_HOMUNCULUSHANDLER_H
+#define NET_TMWA_HOMUNCULUSHANDLER_H
+
+#include "net/homunculushandler.h"
+
+#include "net/tmwa/messagehandler.h"
+
+namespace TmwAthena
+{
+
+class HomunculusHandler final : public MessageHandler,
+ public Net::HomunculusHandler
+{
+ public:
+ HomunculusHandler();
+
+ A_DELETE_COPY(HomunculusHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_HOMUNCULUSHANDLER_H