summaryrefslogtreecommitdiff
path: root/src
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
parentec5a45824c26921c12a1a90dfe541c2e59421e7b (diff)
downloadmanaplus-03548e276d033939449abb9b3a94a57803a57964.tar.gz
manaplus-03548e276d033939449abb9b3a94a57803a57964.tar.bz2
manaplus-03548e276d033939449abb9b3a94a57803a57964.tar.xz
manaplus-03548e276d033939449abb9b3a94a57803a57964.zip
Add empty BuyingStoreHandler.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am5
-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
12 files changed, 254 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ab793d249..e318bf3ce 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1297,6 +1297,8 @@ SET(SRCS_TMWA
net/tmwa/cashshophandler.h
net/tmwa/beinghandler.cpp
net/tmwa/beinghandler.h
+ net/tmwa/buyingstorehandler.cpp
+ net/tmwa/buyingstorehandler.h
net/tmwa/buysellhandler.cpp
net/tmwa/buysellhandler.h
net/tmwa/charserverhandler.cpp
@@ -1362,6 +1364,8 @@ SET(SRCS_EATHENA
net/eathena/cashshophandler.h
net/eathena/beinghandler.cpp
net/eathena/beinghandler.h
+ net/eathena/buyingstorehandler.cpp
+ net/eathena/buyingstorehandler.h
net/eathena/beingtype.h
net/eathena/buysellhandler.cpp
net/eathena/buysellhandler.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 35734de7b..021346f4b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -644,6 +644,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
net/bankhandler.h \
net/cashshophandler.h \
net/beinghandler.h \
+ net/buyingstorehandler.h \
net/buysellhandler.h \
net/character.h \
net/charserverhandler.cpp \
@@ -1229,6 +1230,8 @@ manaplus_SOURCES += \
net/tmwa/cashshophandler.h \
net/tmwa/beinghandler.cpp \
net/tmwa/beinghandler.h \
+ net/tmwa/buyingstorehandler.cpp \
+ net/tmwa/buyingstorehandler.h \
net/tmwa/buysellhandler.cpp \
net/tmwa/buysellhandler.h \
net/tmwa/charserverhandler.cpp \
@@ -1295,6 +1298,8 @@ manaplus_SOURCES += net/eathena/adminhandler.cpp \
net/eathena/cashshophandler.h \
net/eathena/beinghandler.cpp \
net/eathena/beinghandler.h \
+ net/eathena/buyingstorehandler.cpp \
+ net/eathena/buyingstorehandler.h \
net/eathena/beingtype.h \
net/eathena/buysellhandler.cpp \
net/eathena/buysellhandler.h \
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