Changeset 7552 for code/trunk/src/modules/questsystem/GlobalQuest.cc
- Timestamp:
- Oct 17, 2010, 10:50:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/questsystem/GlobalQuest.cc
r7456 r7552 135 135 @return 136 136 Returns true if the quest can be started, false if not. 137 @throws138 Throws an exception if either isInactive() of isActive() throws one.139 137 */ 140 138 bool GlobalQuest::isStartable(const PlayerInfo* player) const … … 153 151 @return 154 152 Returns true if the Quest can be failed, false if not. 155 @throws156 Throws an Exception if isActive() throws one.157 153 */ 158 154 bool GlobalQuest::isFailable(const PlayerInfo* player) const … … 169 165 @return 170 166 Returns true if the Quest can be completed, false if not. 171 @throws172 Throws an Exception if isActive() throws one.173 167 */ 174 168 bool GlobalQuest::isCompletable(const PlayerInfo* player) const … … 182 176 @param player 183 177 The player. 184 @throws185 Throws an Exception if player is NULL.186 178 */ 187 179 QuestStatus::Value GlobalQuest::getStatus(const PlayerInfo* player) const 188 180 { 189 //TODO: Replace with assert. 190 if(player == NULL) // We don't want NULL-Pointers! 191 ThrowException(Argument, "The input PlayerInfo* is NULL."); 181 assert(player); 192 182 193 183 // Find the player. … … 212 202 bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status) 213 203 { 214 //TODO: Replace with assert. 215 if(player == NULL) // We don't want NULL-Pointers! 216 return false; 204 assert(player); 217 205 218 206 // Find the player. … … 235 223 bool GlobalQuest::addRewardEffect(QuestEffect* effect) 236 224 { 237 //TODO: Replace with assert? 238 if(effect == NULL) // We don't want NULL-Pointers! 239 { 240 COUT(2) << "The reward effect to be added to quest {" << this->getId() << "} was NULL." << std::endl; 241 return false; 242 } 225 assert(effect); 243 226 244 227 this->rewards_.push_back(effect); // Add the QuestEffect to the list.
Note: See TracChangeset
for help on using the changeset viewer.