From 054e16e52d633d144b6c11b78e989bb721c59cb2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 24 Sep 2014 13:26:48 +0300 Subject: Add empty HomunculusHandler. --- src/net/tmwa/generalhandler.cpp | 5 ++++- src/net/tmwa/generalhandler.h | 1 + src/net/tmwa/homunculushandler.cpp | 45 ++++++++++++++++++++++++++++++++++++++ src/net/tmwa/homunculushandler.h | 44 +++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 src/net/tmwa/homunculushandler.cpp create mode 100644 src/net/tmwa/homunculushandler.h (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 9a24d6a4e..bde54c207 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -51,6 +51,7 @@ #include "net/tmwa/familyhandler.h" #include "net/tmwa/gamehandler.h" #include "net/tmwa/guildhandler.h" +#include "net/tmwa/homunculushandler.h" #include "net/tmwa/inventoryhandler.h" #include "net/tmwa/itemhandler.h" #include "net/tmwa/loginhandler.h" @@ -108,7 +109,8 @@ GeneralHandler::GeneralHandler() : mFamilyHandler(new FamilyHandler), mBankHandler(new BankHandler), mMercenaryHandler(new MercenaryHandler), - mBuyingStoreHandler(new BuyingStoreHandler) + mBuyingStoreHandler(new BuyingStoreHandler), + mHomunculusHandler(new HomunculusHandler) { static const uint16_t _messages[] = { @@ -229,6 +231,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mBankHandler); mNetwork->registerHandler(mMercenaryHandler); mNetwork->registerHandler(mBuyingStoreHandler); + mNetwork->registerHandler(mHomunculusHandler); } void GeneralHandler::reload() diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index 83d1f574f..a43d56096 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -86,6 +86,7 @@ class GeneralHandler final : public MessageHandler, MessageHandlerPtr mBankHandler; MessageHandlerPtr mMercenaryHandler; MessageHandlerPtr mBuyingStoreHandler; + MessageHandlerPtr mHomunculusHandler; }; } // namespace TmwAthena diff --git a/src/net/tmwa/homunculushandler.cpp b/src/net/tmwa/homunculushandler.cpp new file mode 100644 index 000000000..e9cecc71c --- /dev/null +++ b/src/net/tmwa/homunculushandler.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/homunculushandler.h" + +#include "debug.h" + +extern Net::HomunculusHandler *homunculusHandler; + +namespace TmwAthena +{ + +HomunculusHandler::HomunculusHandler() : + MessageHandler() +{ + static const uint16_t _messages[] = + { + 0 + }; + handledMessages = _messages; + homunculusHandler = this; +} + +void HomunculusHandler::handleMessage(Net::MessageIn &msg A_UNUSED) +{ +} + +} // namespace TmwAthena diff --git a/src/net/tmwa/homunculushandler.h b/src/net/tmwa/homunculushandler.h new file mode 100644 index 000000000..444d4aff9 --- /dev/null +++ b/src/net/tmwa/homunculushandler.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_HOMUNCULUSHANDLER_H +#define NET_TMWA_HOMUNCULUSHANDLER_H + +#include "net/homunculushandler.h" + +#include "net/tmwa/messagehandler.h" + +namespace TmwAthena +{ + +class HomunculusHandler final : public MessageHandler, + public Net::HomunculusHandler +{ + public: + HomunculusHandler(); + + A_DELETE_COPY(HomunculusHandler) + + void handleMessage(Net::MessageIn &msg) override final; +}; + +} // namespace TmwAthena + +#endif // NET_TMWA_HOMUNCULUSHANDLER_H -- cgit v1.2.3-60-g2f50