summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-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
4 files changed, 107 insertions, 1 deletions
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