From a35ac2e4f9e05b379d8520db0e5bd90ad56093df Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Apr 2018 22:48:38 +0300 Subject: Add empty attendance handler. --- src/net/tmwa/attendancehandler.cpp | 38 ++++++++++++++++++++++++++++++++++++ src/net/tmwa/attendancehandler.h | 40 ++++++++++++++++++++++++++++++++++++++ src/net/tmwa/generalhandler.cpp | 3 +++ src/net/tmwa/generalhandler.h | 2 ++ 4 files changed, 83 insertions(+) create mode 100644 src/net/tmwa/attendancehandler.cpp create mode 100644 src/net/tmwa/attendancehandler.h (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/attendancehandler.cpp b/src/net/tmwa/attendancehandler.cpp new file mode 100644 index 000000000..12749d325 --- /dev/null +++ b/src/net/tmwa/attendancehandler.cpp @@ -0,0 +1,38 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2018 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/attendancehandler.h" + +#include "debug.h" + +namespace TmwAthena +{ + +AttendanceHandler::AttendanceHandler() +{ + attendanceHandler = this; +} + +AttendanceHandler::~AttendanceHandler() +{ + attendanceHandler = nullptr; +} + +} // namespace TmwAthena diff --git a/src/net/tmwa/attendancehandler.h b/src/net/tmwa/attendancehandler.h new file mode 100644 index 000000000..3ec9d4b62 --- /dev/null +++ b/src/net/tmwa/attendancehandler.h @@ -0,0 +1,40 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2018 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_ATTENDANCEHANDLER_H +#define NET_TMWA_ATTENDANCEHANDLER_H + +#include "net/attendancehandler.h" + +namespace TmwAthena +{ +class AttendanceHandler final : public Net::AttendanceHandler +{ + public: + AttendanceHandler(); + + A_DELETE_COPY(AttendanceHandler) + + ~AttendanceHandler() override final; +}; + +} // namespace TmwAthena + +#endif // NET_TMWA_ATTENDANCEHANDLER_H diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index f61342e5f..625bbbb8e 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -52,6 +52,7 @@ #include "net/tmwa/questhandler.h" #include "net/tmwa/auctionhandler.h" +#include "net/tmwa/attendancehandler.h" #include "net/tmwa/bankhandler.h" #include "net/tmwa/battlegroundhandler.h" #include "net/tmwa/buyingstorehandler.h" @@ -98,6 +99,7 @@ GeneralHandler::GeneralHandler() : mQuestHandler(new QuestHandler), mServerFeatures(new ServerFeatures), mAuctionHandler(new AuctionHandler), + mAttendanceHandler(new AttendanceHandler), mBankHandler(new BankHandler), mBattleGroundHandler(new BattleGroundHandler), mBuyingStoreHandler(new BuyingStoreHandler), @@ -142,6 +144,7 @@ GeneralHandler::~GeneralHandler() delete2(mQuestHandler); delete2(mServerFeatures); delete2(mAuctionHandler); + delete2(mAttendanceHandler); delete2(mBankHandler); delete2(mBattleGroundHandler); delete2(mBuyingStoreHandler); diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index 8c80c504f..ef2d98969 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -47,6 +47,7 @@ class TradeHandler; class QuestHandler; class ServerFeatures; class AuctionHandler; +class AttendanceHandler; class BankHandler; class BattleGroundHandler; class BuyingStoreHandler; @@ -112,6 +113,7 @@ class GeneralHandler final : public Net::GeneralHandler QuestHandler *mQuestHandler; ServerFeatures *mServerFeatures; AuctionHandler *mAuctionHandler; + AttendanceHandler *mAttendanceHandler; BankHandler *mBankHandler; BattleGroundHandler *mBattleGroundHandler; BuyingStoreHandler *mBuyingStoreHandler; -- cgit v1.2.3-60-g2f50