summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-24 11:30:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-24 11:30:39 +0300
commit03548e276d033939449abb9b3a94a57803a57964 (patch)
treeb77dc158a946d3022a10cf6f08ee76d3cae22721 /src/net
parentec5a45824c26921c12a1a90dfe541c2e59421e7b (diff)
downloadplus-03548e276d033939449abb9b3a94a57803a57964.tar.gz
plus-03548e276d033939449abb9b3a94a57803a57964.tar.bz2
plus-03548e276d033939449abb9b3a94a57803a57964.tar.xz
plus-03548e276d033939449abb9b3a94a57803a57964.zip
Add empty BuyingStoreHandler.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/buyingstorehandler.h42
-rw-r--r--src/net/eathena/buyingstorehandler.cpp57
-rw-r--r--src/net/eathena/buyingstorehandler.h45
-rw-r--r--src/net/eathena/generalhandler.cpp5
-rw-r--r--src/net/eathena/generalhandler.h1
-rw-r--r--src/net/net.cpp2
-rw-r--r--src/net/tmwa/buyingstorehandler.cpp45
-rw-r--r--src/net/tmwa/buyingstorehandler.h44
-rw-r--r--src/net/tmwa/generalhandler.cpp5
-rw-r--r--src/net/tmwa/generalhandler.h1
10 files changed, 245 insertions, 2 deletions
diff --git a/src/net/buyingstorehandler.h b/src/net/buyingstorehandler.h
new file mode 100644
index 000000000..4eceac794
--- /dev/null
+++ b/src/net/buyingstorehandler.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_BUYINGSTOREHANDLER_H
+#define NET_BUYINGSTOREHANDLER_H
+
+#include <string>
+
+#include "localconsts.h"
+
+namespace Net
+{
+
+class BuyingStoreHandler notfinal
+{
+ public:
+ virtual ~BuyingStoreHandler()
+ { }
+};
+
+} // namespace Net
+
+extern Net::BuyingStoreHandler *buyingStoreHandler;
+
+#endif // NET_BUYINGSTOREHANDLER_H
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp
new file mode 100644
index 000000000..cc3972d40
--- /dev/null
+++ b/src/net/eathena/buyingstorehandler.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/buyingstorehandler.h"
+
+#include "logger.h"
+
+#include "net/ea/eaprotocol.h"
+
+#include "net/eathena/messageout.h"
+#include "net/eathena/protocol.h"
+
+#include "debug.h"
+
+extern Net::BuyingStoreHandler *buyingStoreHandler;
+
+namespace EAthena
+{
+
+BuyingStoreHandler::BuyingStoreHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ buyingStoreHandler = this;
+}
+
+void BuyingStoreHandler::handleMessage(Net::MessageIn &msg)
+{
+ switch (msg.getId())
+ {
+ default:
+ break;
+ }
+}
+
+} // namespace EAthena
diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h
new file mode 100644
index 000000000..0a0337939
--- /dev/null
+++ b/src/net/eathena/buyingstorehandler.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_BUYINGSTOREHANDLER_H
+#define NET_EATHENA_BUYINGSTOREHANDLER_H
+
+#include "net/buyingstorehandler.h"
+
+#include "net/eathena/messagehandler.h"
+
+namespace EAthena
+{
+class MessageOut;
+
+class BuyingStoreHandler final : public MessageHandler,
+ public Net::BuyingStoreHandler
+{
+ public:
+ BuyingStoreHandler();
+
+ A_DELETE_COPY(BuyingStoreHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace EAthena
+
+#endif // NET_EATHENA_BUYINGSTOREHANDLER_H
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 12b63a56d..dba1ee41e 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -43,6 +43,7 @@
#include "net/eathena/auctionhandler.h"
#include "net/eathena/bankhandler.h"
#include "net/eathena/beinghandler.h"
+#include "net/eathena/buyingstorehandler.h"
#include "net/eathena/buysellhandler.h"
#include "net/eathena/cashshophandler.h"
#include "net/eathena/chathandler.h"
@@ -106,7 +107,8 @@ GeneralHandler::GeneralHandler() :
mCashShopHandler(new CashShopHandler),
mFamilyHandler(new FamilyHandler),
mBankHandler(new BankHandler),
- mMercenaryHandler(new MercenaryHandler)
+ mMercenaryHandler(new MercenaryHandler),
+ mBuyingStoreHandler(new BuyingStoreHandler)
{
static const uint16_t _messages[] =
{
@@ -210,6 +212,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mFamilyHandler);
mNetwork->registerHandler(mBankHandler);
mNetwork->registerHandler(mMercenaryHandler);
+ mNetwork->registerHandler(mBuyingStoreHandler);
}
void GeneralHandler::reload()
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index a4e46692f..56070b247 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -85,6 +85,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mFamilyHandler;
MessageHandlerPtr mBankHandler;
MessageHandlerPtr mMercenaryHandler;
+ MessageHandlerPtr mBuyingStoreHandler;
};
} // namespace EAthena
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 69a48f400..28bdb22a8 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -46,6 +46,7 @@ namespace Net
class AuctionHandler;
class BankHandler;
class BeingHandler;
+ class BuyingStoreHandler;
class BuySellHandler;
class CashShopHandler;
class CharServerHandler;
@@ -92,6 +93,7 @@ Net::CashShopHandler *cashShopHandler = nullptr;
Net::FamilyHandler *familyHandler = nullptr;
Net::BankHandler *bankHandler = nullptr;
Net::QuestHandler *questHandler = nullptr;
+Net::BuyingStoreHandler *buyingStoreHandler = nullptr;
namespace Net
{
diff --git a/src/net/tmwa/buyingstorehandler.cpp b/src/net/tmwa/buyingstorehandler.cpp
new file mode 100644
index 000000000..86f5dc791
--- /dev/null
+++ b/src/net/tmwa/buyingstorehandler.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/buyingstorehandler.h"
+
+#include "debug.h"
+
+extern Net::BuyingStoreHandler *buyingStoreHandler;
+
+namespace TmwAthena
+{
+
+BuyingStoreHandler::BuyingStoreHandler() :
+ MessageHandler()
+{
+ static const uint16_t _messages[] =
+ {
+ 0
+ };
+ handledMessages = _messages;
+ buyingStoreHandler = this;
+}
+
+void BuyingStoreHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
+{
+}
+
+} // namespace TmwAthena
diff --git a/src/net/tmwa/buyingstorehandler.h b/src/net/tmwa/buyingstorehandler.h
new file mode 100644
index 000000000..41149a639
--- /dev/null
+++ b/src/net/tmwa/buyingstorehandler.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_BUYINGSTOREHANDLER_H
+#define NET_TMWA_BUYINGSTOREHANDLER_H
+
+#include "net/buyingstorehandler.h"
+
+#include "net/tmwa/messagehandler.h"
+
+namespace TmwAthena
+{
+
+class BuyingStoreHandler final : public MessageHandler,
+ public Net::BuyingStoreHandler
+{
+ public:
+ BuyingStoreHandler();
+
+ A_DELETE_COPY(BuyingStoreHandler)
+
+ void handleMessage(Net::MessageIn &msg) override final;
+};
+
+} // namespace TmwAthena
+
+#endif // NET_TMWA_BUYINGSTOREHANDLER_H
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 800148a41..9a24d6a4e 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -43,6 +43,7 @@
#include "net/tmwa/auctionhandler.h"
#include "net/tmwa/bankhandler.h"
#include "net/tmwa/beinghandler.h"
+#include "net/tmwa/buyingstorehandler.h"
#include "net/tmwa/buysellhandler.h"
#include "net/tmwa/cashshophandler.h"
#include "net/tmwa/chathandler.h"
@@ -106,7 +107,8 @@ GeneralHandler::GeneralHandler() :
mCashShopHandler(new CashShopHandler),
mFamilyHandler(new FamilyHandler),
mBankHandler(new BankHandler),
- mMercenaryHandler(new MercenaryHandler)
+ mMercenaryHandler(new MercenaryHandler),
+ mBuyingStoreHandler(new BuyingStoreHandler)
{
static const uint16_t _messages[] =
{
@@ -226,6 +228,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mFamilyHandler);
mNetwork->registerHandler(mBankHandler);
mNetwork->registerHandler(mMercenaryHandler);
+ mNetwork->registerHandler(mBuyingStoreHandler);
}
void GeneralHandler::reload()
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index ed8a2e12c..83d1f574f 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -85,6 +85,7 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mFamilyHandler;
MessageHandlerPtr mBankHandler;
MessageHandlerPtr mMercenaryHandler;
+ MessageHandlerPtr mBuyingStoreHandler;
};
} // namespace TmwAthena