Changeset 7552 for code/trunk/src/modules/questsystem/LocalQuest.cc
- Timestamp:
- Oct 17, 2010, 10:50:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/questsystem/LocalQuest.cc
r7456 r7552 125 125 @return 126 126 Returns true if the Quest can be started, false if not. 127 @throws128 Throws an exception if isInactive(PlayerInfo*) throws one.129 127 */ 130 128 bool LocalQuest::isStartable(const PlayerInfo* player) const … … 143 141 @return 144 142 Returns true if the Quest can be failed, false if not. 145 @throws146 Throws an exception if isActive(PlayerInfo*) throws one.147 143 */ 148 144 bool LocalQuest::isFailable(const PlayerInfo* player) const … … 158 154 @return 159 155 Returns true if the Quest can be completed, false if not. 160 @throws161 Throws an exception if isInactive(PlayerInfo*) throws one.162 156 */ 163 157 bool LocalQuest::isCompletable(const PlayerInfo* player) const … … 173 167 @return 174 168 Returns the status of the Quest for the input player. 175 @throws176 Throws an Exception if player is NULL.177 169 */ 178 170 QuestStatus::Value LocalQuest::getStatus(const PlayerInfo* player) const 179 171 { 180 //TODO: Replace with assert. 181 if(player == NULL) // No player has no defined status. 182 ThrowException(Argument, "The input PlayerInfo* is NULL."); 172 assert(player); 183 173 184 174 std::map<const PlayerInfo*, QuestStatus::Value>::const_iterator it = this->playerStatus_.find(player); … … 202 192 bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status) 203 193 { 204 //TODO: Replace with assert. 205 if(player == NULL) // We can't set a status for no player. 206 return false; 194 assert(player); 207 195 208 196 this->playerStatus_[player] = status;
Note: See TracChangeset
for help on using the changeset viewer.