diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-26 06:13:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-26 06:13:20 +0300 |
commit | 5b896ca505255c8f3f567cea87fad93444a6b2fd (patch) | |
tree | a3b0c9fb6c8c3fc112345d366afb03edce764e08 /src/net/tmwa | |
parent | 014f6d127beb00f08531c038b4edcd7cc049aba2 (diff) | |
download | manaverse-5b896ca505255c8f3f567cea87fad93444a6b2fd.tar.gz manaverse-5b896ca505255c8f3f567cea87fad93444a6b2fd.tar.bz2 manaverse-5b896ca505255c8f3f567cea87fad93444a6b2fd.tar.xz manaverse-5b896ca505255c8f3f567cea87fad93444a6b2fd.zip |
Add packet CMSG_ACHIEVEMENT_GET_REWARD 0x0a25.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/achievementhandler.cpp | 42 | ||||
-rw-r--r-- | src/net/tmwa/achievementhandler.h | 42 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.h | 2 |
4 files changed, 89 insertions, 0 deletions
diff --git a/src/net/tmwa/achievementhandler.cpp b/src/net/tmwa/achievementhandler.cpp new file mode 100644 index 000000000..fb92effab --- /dev/null +++ b/src/net/tmwa/achievementhandler.cpp @@ -0,0 +1,42 @@ +/* + * 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 <http://www.gnu.org/licenses/>. + */ + +#include "net/tmwa/achievementhandler.h" + +#include "debug.h" + +namespace TmwAthena +{ + +AchievementHandler::AchievementHandler() +{ + achievementHandler = this; +} + +AchievementHandler::~AchievementHandler() +{ + achievementHandler = nullptr; +} + +void AchievementHandler::requestReward(const int achId A_UNUSED) const +{ +} + +} // namespace TmwAthena diff --git a/src/net/tmwa/achievementhandler.h b/src/net/tmwa/achievementhandler.h new file mode 100644 index 000000000..a7d9fa8d1 --- /dev/null +++ b/src/net/tmwa/achievementhandler.h @@ -0,0 +1,42 @@ +/* + * 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 <http://www.gnu.org/licenses/>. + */ + +#ifndef NET_TMWA_ACHIEVEMENTHANDLER_H +#define NET_TMWA_ACHIEVEMENTHANDLER_H + +#include "net/achievementhandler.h" + +namespace TmwAthena +{ +class AchievementHandler final : public Net::AchievementHandler +{ + public: + AchievementHandler(); + + A_DELETE_COPY(AchievementHandler) + + ~AchievementHandler() override final; + + void requestReward(const int achId) const override final; +}; + +} // namespace TmwAthena + +#endif // NET_TMWA_ACHIEVEMENTHANDLER_H diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 9a1701fc1..99865f61d 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/achievementhandler.h" #include "net/tmwa/attendancehandler.h" #include "net/tmwa/bankhandler.h" #include "net/tmwa/battlegroundhandler.h" @@ -99,6 +100,7 @@ GeneralHandler::GeneralHandler() : mQuestHandler(new QuestHandler), mServerFeatures(new ServerFeatures), mAuctionHandler(new AuctionHandler), + mAchievementHandler(new AchievementHandler), mAttendanceHandler(new AttendanceHandler), mBankHandler(new BankHandler), mBattleGroundHandler(new BattleGroundHandler), @@ -145,6 +147,7 @@ GeneralHandler::~GeneralHandler() delete2(mQuestHandler); delete2(mServerFeatures); delete2(mAuctionHandler); + delete2(mAchievementHandler); delete2(mAttendanceHandler); delete2(mBankHandler); delete2(mBattleGroundHandler); diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index ef2d98969..1be9b9f97 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 AchievementHandler; class AttendanceHandler; class BankHandler; class BattleGroundHandler; @@ -113,6 +114,7 @@ class GeneralHandler final : public Net::GeneralHandler QuestHandler *mQuestHandler; ServerFeatures *mServerFeatures; AuctionHandler *mAuctionHandler; + AchievementHandler *mAchievementHandler; AttendanceHandler *mAttendanceHandler; BankHandler *mBankHandler; BattleGroundHandler *mBattleGroundHandler; |