- Timestamp:
- Dec 10, 2008, 4:19:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/quest/LocalQuest.cc
r2371 r2385 29 29 /** 30 30 @file LocalQuest.cc 31 @brief 32 Implementation of the LocalQuest class. 31 @brief Implementation of the LocalQuest class. 33 32 */ 34 33 … … 37 36 38 37 #include "core/CoreIncludes.h" 38 #include "core/Super.h" 39 39 #include "util/Exception.h" 40 40 … … 86 86 bool LocalQuest::fail(PlayerInfo* player) 87 87 { 88 if(this->isFailable(player)) //!< Checks whether the quest can be failed. 89 { 90 this->setStatus(player, questStatus::failed); 91 QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects. 92 return true; 93 } 94 95 COUT(4) << "A non-failable quest was trying to be failed." << std::endl; 96 return false; 88 if(!this->isFailable(player)) //!< Checks whether the quest can be failed. 89 { 90 COUT(4) << "A non-failable quest was trying to be failed." << std::endl; 91 return false; 92 } 93 94 Quest::fail(player); 95 96 QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects. 97 return true; 97 98 } 98 99 … … 108 109 bool LocalQuest::complete(PlayerInfo* player) 109 110 { 110 if(this->isCompletable(player)) //!< Checks whether the Quest can be completed. 111 { 112 this->setStatus(player, questStatus::completed); 113 QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects. 114 return true; 115 } 116 117 COUT(4) << "A non-completable quest was trying to be completed." << std::endl; 118 return false; 111 if(!this->isCompletable(player)) //!< Checks whether the Quest can be completed. 112 { 113 COUT(4) << "A non-completable quest was trying to be completed." << std::endl; 114 return false; 115 } 116 117 Quest::complete(player); 118 119 QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects. 120 return true; 119 121 } 120 122
Note: See TracChangeset
for help on using the changeset viewer.