- Timestamp:
- Nov 13, 2008, 9:55:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.cc
r2191 r2205 36 36 #include "GlobalQuest.h" 37 37 38 #include "orxonox/objects/ worldentities/ControllableEntity.h"38 #include "orxonox/objects/infos/PlayerInfo.h" 39 39 #include "core/CoreIncludes.h" 40 40 #include "util/Exception.h" … … 86 86 Returns true if the Quest could be failed, false if not. 87 87 */ 88 bool GlobalQuest::fail( ControllableEntity* player)88 bool GlobalQuest::fail(PlayerInfo* player) 89 89 { 90 90 if(this->isFailable(player)) //!< Check whether the Quest can be failed. … … 93 93 94 94 //! Iterate through all players possessing this Quest. 95 for(std::set< ControllableEntity*>::const_iterator it = players_.begin(); it != players_.end(); it++)95 for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++) 96 96 { 97 97 QuestEffect::invokeEffects(*it, this->getFailEffectList()); … … 115 115 Returns true if the Quest could be completed, false if not. 116 116 */ 117 bool GlobalQuest::complete( ControllableEntity* player)117 bool GlobalQuest::complete(PlayerInfo* player) 118 118 { 119 119 if(this->isCompletable(player)) //!< Check whether the Quest can be completed. … … 122 122 123 123 //! Iterate through all players possessing the Quest. 124 for(std::set< ControllableEntity*>::const_iterator it = players_.begin(); it != players_.end(); it++)124 for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++) 125 125 { 126 126 QuestEffect::invokeEffects(*it, this->getCompleteEffectList()); … … 145 145 Throws an exception if either isInactive() of isActive() throws one. 146 146 */ 147 bool GlobalQuest::isStartable(const ControllableEntity* player) const147 bool GlobalQuest::isStartable(const PlayerInfo* player) const 148 148 { 149 149 return this->isInactive(player) || this->isActive(player); … … 160 160 Throws an Exception if isActive() throws one. 161 161 */ 162 bool GlobalQuest::isFailable(const ControllableEntity* player) const162 bool GlobalQuest::isFailable(const PlayerInfo* player) const 163 163 { 164 164 return this->isActive(player); … … 176 176 Throws an Exception if isActive() throws one. 177 177 */ 178 bool GlobalQuest::isCompletable(const ControllableEntity* player) const178 bool GlobalQuest::isCompletable(const PlayerInfo* player) const 179 179 { 180 180 return this->isActive(player); … … 189 189 Throws an Exception if player is NULL. 190 190 */ 191 questStatus::Enum GlobalQuest::getStatus(const ControllableEntity* player) const191 questStatus::Enum GlobalQuest::getStatus(const PlayerInfo* player) const 192 192 { 193 193 if(player == NULL) //!< We don't want NULL-Pointers! 194 194 { 195 ThrowException(Argument, "The input ControllableEntity* is NULL.");195 ThrowException(Argument, "The input PlayerInfo* is NULL."); 196 196 } 197 197 198 198 //! Find the player. 199 std::set< ControllableEntity*>::const_iterator it = this->players_.find((ControllableEntity*)(void*)player);199 std::set<PlayerInfo*>::const_iterator it = this->players_.find((PlayerInfo*)(void*)player); 200 200 if (it != this->players_.end()) //!< If the player was found. 201 201 { … … 217 217 Returns false if player is NULL. 218 218 */ 219 bool GlobalQuest::setStatus( ControllableEntity* player, const questStatus::Enum & status)219 bool GlobalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status) 220 220 { 221 221 if(player == NULL) //!< We don't want NULL-Pointers! … … 225 225 226 226 //! Find the player. 227 std::set< ControllableEntity*>::const_iterator it = this->players_.find(player);227 std::set<PlayerInfo*>::const_iterator it = this->players_.find(player); 228 228 if (it == this->players_.end()) //!< Player is not yet in the list. 229 229 {
Note: See TracChangeset
for help on using the changeset viewer.