- Timestamp:
- Oct 30, 2008, 9:52:12 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/FailQuest.cc
r2021 r2068 28 28 29 29 #include "core/CoreIncludes.h" 30 #include "util/Exception.h" 30 31 31 32 #include "QuestManager.h" … … 66 67 @param player 67 68 The player the effect is invoked on. 69 @return 70 Returns true if the effect was invoked successfully. 68 71 */ 69 voidFailQuest::invoke(Player* player)72 bool FailQuest::invoke(Player* player) 70 73 { 71 Quest* quest = QuestManager::findQuest(this->getQuestId()); 72 quest->fail(player); 74 if(player == NULL) 75 { 76 COUT(2) << "Input player is NULL." << std::endl; 77 return false; 78 } 79 80 try 81 { 82 Quest* quest = QuestManager::findQuest(this->getQuestId()); 83 if(!quest->fail(player)) 84 { 85 return false; 86 } 87 } 88 catch(const Exception& e) 89 { 90 COUT(2) << e.getFullDescription() << std::endl; 91 return false; 92 } 93 94 return true; 73 95 } 74 96
Note: See TracChangeset
for help on using the changeset viewer.