diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-15 16:02:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-15 16:02:49 +0300 |
commit | 97899e857e2ebe6bf038b8fdfed81fb489d0d0cb (patch) | |
tree | 1cd4b5ebfcd6f422f524821381a19ca7d6ff0e69 /src | |
parent | 32a344ef8f062c5fd5ec84321b4975ceba1e377d (diff) | |
download | mv-97899e857e2ebe6bf038b8fdfed81fb489d0d0cb.tar.gz mv-97899e857e2ebe6bf038b8fdfed81fb489d0d0cb.tar.bz2 mv-97899e857e2ebe6bf038b8fdfed81fb489d0d0cb.tar.xz mv-97899e857e2ebe6bf038b8fdfed81fb489d0d0cb.zip |
Add empty cashshophandler.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/net/cashshophandler.h | 40 | ||||
-rw-r--r-- | src/net/eathena/cashshophandler.cpp | 57 | ||||
-rw-r--r-- | src/net/eathena/cashshophandler.h | 45 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.h | 1 | ||||
-rw-r--r-- | src/net/net.cpp | 6 | ||||
-rw-r--r-- | src/net/net.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/cashshophandler.cpp | 45 | ||||
-rw-r--r-- | src/net/tmwa/cashshophandler.h | 44 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.h | 1 |
13 files changed, 258 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 846fbc9e2..6f6f79a3b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1277,6 +1277,8 @@ SET(SRCS_TMWA net/tmwa/attrs.h net/tmwa/auctionhandler.cpp net/tmwa/auctionhandler.h + net/tmwa/cashshophandler.cpp + net/tmwa/cashshophandler.h net/tmwa/beinghandler.cpp net/tmwa/beinghandler.h net/tmwa/buysellhandler.cpp @@ -1334,6 +1336,8 @@ SET(SRCS_EATHENA net/eathena/attrs.h net/eathena/auctionhandler.cpp net/eathena/auctionhandler.h + net/eathena/cashshophandler.cpp + net/eathena/cashshophandler.h net/eathena/beinghandler.cpp net/eathena/beinghandler.h net/eathena/beingtype.h diff --git a/src/Makefile.am b/src/Makefile.am index b68e57fb4..8f9ce0d19 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -635,6 +635,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ gui/windows/worldselectdialog.h \ net/adminhandler.h \ net/auctionhandler.h \ + net/cashshophandler.h \ net/beinghandler.h \ net/buysellhandler.h \ net/character.h \ @@ -1206,6 +1207,8 @@ manaplus_SOURCES += \ net/tmwa/attrs.h \ net/tmwa/auctionhandler.cpp \ net/tmwa/auctionhandler.h \ + net/tmwa/cashshophandler.cpp \ + net/tmwa/cashshophandler.h \ net/tmwa/beinghandler.cpp \ net/tmwa/beinghandler.h \ net/tmwa/buysellhandler.cpp \ @@ -1264,6 +1267,8 @@ manaplus_SOURCES += net/eathena/adminhandler.cpp \ net/eathena/attrs.h \ net/eathena/auctionhandler.cpp \ net/eathena/auctionhandler.h \ + net/eathena/cashshophandler.cpp \ + net/eathena/cashshophandler.h \ net/eathena/beinghandler.cpp \ net/eathena/beinghandler.h \ net/eathena/beingtype.h \ diff --git a/src/net/cashshophandler.h b/src/net/cashshophandler.h new file mode 100644 index 000000000..73181f107 --- /dev/null +++ b/src/net/cashshophandler.h @@ -0,0 +1,40 @@ +/* + * 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_CACHSHOPHANDLER_H +#define NET_CACHSHOPHANDLER_H + +#include <string> + +#include "localconsts.h" + +namespace Net +{ + +class CashShopHandler notfinal +{ + public: + virtual ~CashShopHandler() + { } +}; + +} // namespace Net + +#endif // NET_CACHSHOPHANDLER_H diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp new file mode 100644 index 000000000..6c2273d3a --- /dev/null +++ b/src/net/eathena/cashshophandler.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/cashshophandler.h" + +#include "logger.h" + +#include "net/ea/eaprotocol.h" + +#include "net/eathena/messageout.h" +#include "net/eathena/protocol.h" + +#include "debug.h" + +extern Net::CashShopHandler *cashShopHandler; + +namespace EAthena +{ + +CashShopHandler::CashShopHandler() : + MessageHandler() +{ + static const uint16_t _messages[] = + { + 0 + }; + handledMessages = _messages; + cashShopHandler = this; +} + +void CashShopHandler::handleMessage(Net::MessageIn &msg) +{ + switch (msg.getId()) + { + default: + break; + } +} + +} // namespace EAthena diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h new file mode 100644 index 000000000..7a6f354a8 --- /dev/null +++ b/src/net/eathena/cashshophandler.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_CASHSHOPHANDLER_H +#define NET_EATHENA_CASHSHOPHANDLER_H + +#include "net/cashshophandler.h" + +#include "net/eathena/messagehandler.h" + +namespace EAthena +{ +class MessageOut; + +class CashShopHandler final : public MessageHandler, + public Net::CashShopHandler +{ + public: + CashShopHandler(); + + A_DELETE_COPY(CashShopHandler) + + void handleMessage(Net::MessageIn &msg) override final; +}; + +} // namespace EAthena + +#endif // NET_EATHENA_CASHSHOPHANDLER_H diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index e55ff51ff..72b2d74b0 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/beinghandler.h" #include "net/eathena/buysellhandler.h" +#include "net/eathena/cashshophandler.h" #include "net/eathena/chathandler.h" #include "net/eathena/charserverhandler.h" #include "net/eathena/gamehandler.h" @@ -98,7 +99,8 @@ GeneralHandler::GeneralHandler() : mQuestHandler(new QuestHandler), mServerFeatures(new ServerFeatures), mMailHandler(new MailHandler), - mAuctionHandler(new AuctionHandler) + mAuctionHandler(new AuctionHandler), + mCashShopHandler(new CashShopHandler) { static const uint16_t _messages[] = { @@ -198,6 +200,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mQuestHandler.get()); mNetwork->registerHandler(mMailHandler.get()); mNetwork->registerHandler(mAuctionHandler.get()); + mNetwork->registerHandler(mCashShopHandler.get()); } void GeneralHandler::reload() diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h index 440273ce0..aed157d9b 100644 --- a/src/net/eathena/generalhandler.h +++ b/src/net/eathena/generalhandler.h @@ -81,6 +81,7 @@ class GeneralHandler final : public MessageHandler, ServerFeatures *mServerFeatures; MessageHandlerPtr mMailHandler; MessageHandlerPtr mAuctionHandler; + MessageHandlerPtr mCashShopHandler; }; } // namespace EAthena diff --git a/src/net/net.cpp b/src/net/net.cpp index 79c1bffdd..4ef6c6ea6 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -55,6 +55,7 @@ Net::BuySellHandler *buySellHandler = nullptr; Net::ServerFeatures *serverFeatures = nullptr; Net::MailHandler *mailHandler = nullptr; Net::AuctionHandler *auctionHandler = nullptr; +Net::CashShopHandler *cashShopHandler = nullptr; Net::AdminHandler *Net::getAdminHandler() { @@ -151,6 +152,11 @@ Net::AuctionHandler *Net::getAuctionHandler() return auctionHandler; } +Net::CashShopHandler *Net::getCashShopHandler() +{ + return cashShopHandler; +} + namespace Net { ServerInfo::Type networkType = ServerInfo::UNKNOWN; diff --git a/src/net/net.h b/src/net/net.h index fef1b5315..ade184a81 100644 --- a/src/net/net.h +++ b/src/net/net.h @@ -39,6 +39,7 @@ namespace Net class AdminHandler; class AuctionHandler; class BeingHandler; +class CashShopHandler; class CharServerHandler; class ChatHandler; class GameHandler; @@ -75,6 +76,7 @@ BuySellHandler *getBuySellHandler() A_WARN_UNUSED; ServerFeatures *getServerFeatures() A_WARN_UNUSED; MailHandler *getMailHandler() A_WARN_UNUSED; AuctionHandler *getAuctionHandler() A_WARN_UNUSED; +CashShopHandler *getCashShopHandler() A_WARN_UNUSED; ServerInfo::Type getNetworkType() A_WARN_UNUSED; diff --git a/src/net/tmwa/cashshophandler.cpp b/src/net/tmwa/cashshophandler.cpp new file mode 100644 index 000000000..99acd6653 --- /dev/null +++ b/src/net/tmwa/cashshophandler.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/cashshophandler.h" + +#include "debug.h" + +extern Net::CashShopHandler *cashShopHandler; + +namespace TmwAthena +{ + +CashShopHandler::CashShopHandler() : + MessageHandler() +{ + static const uint16_t _messages[] = + { + 0 + }; + handledMessages = _messages; + cashShopHandler = this; +} + +void CashShopHandler::handleMessage(Net::MessageIn &msg A_UNUSED) +{ +} + +} // namespace TmwAthena diff --git a/src/net/tmwa/cashshophandler.h b/src/net/tmwa/cashshophandler.h new file mode 100644 index 000000000..9b7cf86e6 --- /dev/null +++ b/src/net/tmwa/cashshophandler.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_CASHSHOPHANDLER_H +#define NET_TMWA_CASHSHOPHANDLER_H + +#include "net/cashshophandler.h" + +#include "net/tmwa/messagehandler.h" + +namespace TmwAthena +{ + +class CashShopHandler final : public MessageHandler, + public Net::CashShopHandler +{ + public: + CashShopHandler(); + + A_DELETE_COPY(CashShopHandler) + + void handleMessage(Net::MessageIn &msg) override final; +}; + +} // namespace TmwAthena + +#endif // NET_TMWA_CASHSHOPHANDLER_H diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index dabf4efce..f8f1a1b19 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/beinghandler.h" #include "net/tmwa/buysellhandler.h" +#include "net/tmwa/cashshophandler.h" #include "net/tmwa/chathandler.h" #include "net/tmwa/charserverhandler.h" #include "net/tmwa/gamehandler.h" @@ -98,7 +99,8 @@ GeneralHandler::GeneralHandler() : mQuestHandler(new QuestHandler), mServerFeatures(new ServerFeatures), mMailHandler(new MailHandler), - mAuctionHandler(new AuctionHandler) + mAuctionHandler(new AuctionHandler), + mCashShopHandler(new CashShopHandler) { static const uint16_t _messages[] = { @@ -214,6 +216,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mQuestHandler.get()); mNetwork->registerHandler(mMailHandler.get()); mNetwork->registerHandler(mAuctionHandler.get()); + mNetwork->registerHandler(mCashShopHandler.get()); } void GeneralHandler::reload() diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index 5a7bed57b..ec9679b4a 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -81,6 +81,7 @@ class GeneralHandler final : public MessageHandler, ServerFeatures *mServerFeatures; MessageHandlerPtr mMailHandler; MessageHandlerPtr mAuctionHandler; + MessageHandlerPtr mCashShopHandler; }; } // namespace TmwAthena |