- Timestamp:
- Nov 12, 2008, 1:29:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.cc
r2159 r2191 79 79 /** 80 80 @brief 81 Fails the quest for all players.82 Invokes the fail Effects on all the players possessing this quest.81 Fails the Quest for all players. 82 Invokes the fail QuestEffects on all the players possessing this Quest. 83 83 @param player 84 84 The player failing it. 85 85 @return 86 Returns true if the quest could be failed, false if not.86 Returns true if the Quest could be failed, false if not. 87 87 */ 88 88 bool GlobalQuest::fail(ControllableEntity* player) 89 89 { 90 if(this->isFailable(player)) //!< Check whether the quest can be failed.90 if(this->isFailable(player)) //!< Check whether the Quest can be failed. 91 91 { 92 92 this->setStatus(player, questStatus::failed); 93 93 94 //! Iterate through all players possessing this quest.94 //! Iterate through all players possessing this Quest. 95 95 for(std::set<ControllableEntity*>::const_iterator it = players_.begin(); it != players_.end(); it++) 96 96 { … … 107 107 /** 108 108 @brief 109 Completes the quest for all players.110 Invokes the complete Effects on all the players possessing this quest.111 Invokes the reward effects on the player completing the quest.109 Completes the Quest for all players. 110 Invokes the complete QuestEffects on all the players possessing this Quest. 111 Invokes the reward QuestEffects on the player completing the Quest. 112 112 @param player 113 113 The player completing it. 114 114 @return 115 Returns true if the quest could be completed, false if not.115 Returns true if the Quest could be completed, false if not. 116 116 */ 117 117 bool GlobalQuest::complete(ControllableEntity* player) 118 118 { 119 if(this->isCompletable(player)) //!< Check whether the quest can be completed.119 if(this->isCompletable(player)) //!< Check whether the Quest can be completed. 120 120 { 121 121 this->setStatus(player, questStatus::completed); 122 122 123 //! Iterate through all players possessing the quest.123 //! Iterate through all players possessing the Quest. 124 124 for(std::set<ControllableEntity*>::const_iterator it = players_.begin(); it != players_.end(); it++) 125 125 { … … 127 127 } 128 128 129 QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward effects on the player completing the quest.129 QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest. 130 130 return true; 131 131 } … … 137 137 /** 138 138 @brief 139 Checks whether the quest can be started.139 Checks whether the Quest can be started. 140 140 @param player 141 141 The player for whom is to be checked. … … 152 152 /** 153 153 @brief 154 Checks whether the quest can be failed.154 Checks whether the Quest can be failed. 155 155 @param player 156 156 The player for whom is to be checked. 157 157 @return 158 Returns true if the quest can be failed, false if not.158 Returns true if the Quest can be failed, false if not. 159 159 @throws 160 160 Throws an Exception if isActive() throws one. … … 168 168 /** 169 169 @brief 170 Checks whether the quest can be completed.170 Checks whether the Quest can be completed. 171 171 @param player 172 172 The player for whom is to be checked. 173 173 @return 174 Returns true if the quest can be completed, false if not.174 Returns true if the Quest can be completed, false if not. 175 175 @throws 176 176 Throws an Exception if isActive() throws one. … … 183 183 /** 184 184 @brief 185 Returns the status of the quest for a specific player.185 Returns the status of the Quest for a specific player. 186 186 @param player 187 187 The player. … … 237 237 /** 238 238 @brief 239 Adds a reward effect to the list of reward effects.239 Adds a reward QuestEffect to the list of reward QuestEffects. 240 240 @param effect 241 The effect to be added.241 The QuestEffect to be added. 242 242 @return 243 243 Returns true if successful. … … 251 251 } 252 252 253 this->rewards_.push_back(effect); //!< Add the effect to the list.253 this->rewards_.push_back(effect); //!< Add the QuestEffect to the list. 254 254 255 255 COUT(3) << "Reward effect was added to Quest {" << this->getId() << "}." << std::endl; … … 259 259 /** 260 260 @brief 261 Returns the reward effect at the given index.261 Returns the reward QuestEffect at the given index. 262 262 @param index 263 263 The index.
Note: See TracChangeset
for help on using the changeset viewer.