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