[1992] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Damian 'Mozork' Frick |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
[2021] | 29 | #include "core/CoreIncludes.h" |
---|
| 30 | |
---|
| 31 | #include "QuestManager.h" |
---|
| 32 | #include "Quest.h" |
---|
[1992] | 33 | #include "FailQuest.h" |
---|
| 34 | |
---|
| 35 | namespace orxonox { |
---|
| 36 | |
---|
| 37 | CreateFactory(FailQuest); |
---|
| 38 | |
---|
[2021] | 39 | FailQuest::FailQuest() : ChangeQuestStatus() |
---|
| 40 | { |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | |
---|
[1992] | 44 | /** |
---|
| 45 | @brief |
---|
| 46 | Constructor. |
---|
| 47 | @param questId |
---|
| 48 | The id of the quest to be failed. |
---|
| 49 | */ |
---|
| 50 | FailQuest::FailQuest(std::string questId) : ChangeQuestStatus(questId) |
---|
| 51 | { |
---|
| 52 | RegisterObject(FailQuest); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | /** |
---|
| 56 | @brief |
---|
| 57 | Destructor. |
---|
| 58 | */ |
---|
| 59 | FailQuest::~FailQuest() |
---|
| 60 | { |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | /** |
---|
| 64 | @brief |
---|
| 65 | Invokes the effect. |
---|
| 66 | @param player |
---|
| 67 | The player the effect is invoked on. |
---|
| 68 | */ |
---|
[2021] | 69 | void FailQuest::invoke(Player* player) |
---|
[1992] | 70 | { |
---|
[2021] | 71 | Quest* quest = QuestManager::findQuest(this->getQuestId()); |
---|
| 72 | quest->fail(player); |
---|
[1992] | 73 | } |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | } |
---|