- Timestamp:
- Dec 3, 2008, 4:40:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem3/src/orxonox/objects/quest/LocalQuest.cc
r2261 r2328 37 37 38 38 #include "core/CoreIncludes.h" 39 #include "core/Super.h" 39 40 #include "util/Exception.h" 40 41 … … 86 87 bool LocalQuest::fail(PlayerInfo* player) 87 88 { 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; 89 if(!this->isFailable(player)) //!< Checks whether the quest can be failed. 90 { 91 COUT(4) << "A non-failable quest was trying to be failed." << std::endl; 92 return false; 93 } 94 95 Quest::fail(player); 96 97 QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects. 98 return true; 97 99 } 98 100 … … 108 110 bool LocalQuest::complete(PlayerInfo* player) 109 111 { 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; 112 if(!this->isCompletable(player)) //!< Checks whether the Quest can be completed. 113 { 114 COUT(4) << "A non-completable quest was trying to be completed." << std::endl; 115 return false; 116 } 117 118 Quest::complete(player); 119 120 QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects. 121 return true; 119 122 } 120 123
Note: See TracChangeset
for help on using the changeset viewer.