From 03548e276d033939449abb9b3a94a57803a57964 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 24 Sep 2014 11:30:39 +0300 Subject: Add empty BuyingStoreHandler. --- src/net/tmwa/buyingstorehandler.cpp | 45 +++++++++++++++++++++++++++++++++++++ src/net/tmwa/buyingstorehandler.h | 44 ++++++++++++++++++++++++++++++++++++ src/net/tmwa/generalhandler.cpp | 5 ++++- src/net/tmwa/generalhandler.h | 1 + 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 src/net/tmwa/buyingstorehandler.cpp create mode 100644 src/net/tmwa/buyingstorehandler.h (limited to 'src/net/tmwa') 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 . + */ + +#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 . + */ + +#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 -- cgit v1.2.3-70-g09d2