- Timestamp:
- Nov 13, 2008, 9:55:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/LocalQuest.cc
r2191 r2205 39 39 #include "util/Exception.h" 40 40 41 #include "orxonox/objects/ worldentities/ControllableEntity.h"41 #include "orxonox/objects/infos/PlayerInfo.h" 42 42 #include "QuestEffect.h" 43 43 … … 84 84 Returns true if the Quest could be failed, false if not. 85 85 */ 86 bool LocalQuest::fail( ControllableEntity* player)86 bool LocalQuest::fail(PlayerInfo* player) 87 87 { 88 88 if(this->isFailable(player)) //!< Checks whether the quest can be failed. … … 106 106 Returns true if the Quest could be completed, false if not. 107 107 */ 108 bool LocalQuest::complete( ControllableEntity* player)108 bool LocalQuest::complete(PlayerInfo* player) 109 109 { 110 110 if(this->isCompletable(player)) //!< Checks whether the Quest can be completed. … … 127 127 Returns true if the Quest can be started, false if not. 128 128 @throws 129 Throws an exception if isInactive( ControllableEntity*) throws one.130 */ 131 bool LocalQuest::isStartable(const ControllableEntity* player) const129 Throws an exception if isInactive(PlayerInfo*) throws one. 130 */ 131 bool LocalQuest::isStartable(const PlayerInfo* player) const 132 132 { 133 133 return this->isInactive(player); … … 142 142 Returns true if the Quest can be failed, false if not. 143 143 @throws 144 Throws an exception if isActive( ControllableEntity*) throws one.145 */ 146 bool LocalQuest::isFailable(const ControllableEntity* player) const144 Throws an exception if isActive(PlayerInfo*) throws one. 145 */ 146 bool LocalQuest::isFailable(const PlayerInfo* player) const 147 147 { 148 148 return this->isActive(player); … … 157 157 Returns true if the Quest can be completed, false if not. 158 158 @throws 159 Throws an exception if isInactive( ControllableEntity*) throws one.160 */ 161 bool LocalQuest::isCompletable(const ControllableEntity* player) const159 Throws an exception if isInactive(PlayerInfo*) throws one. 160 */ 161 bool LocalQuest::isCompletable(const PlayerInfo* player) const 162 162 { 163 163 return this->isActive(player); … … 174 174 Throws an Exception if player is NULL. 175 175 */ 176 questStatus::Enum LocalQuest::getStatus(const ControllableEntity* player) const176 questStatus::Enum LocalQuest::getStatus(const PlayerInfo* player) const 177 177 { 178 178 if(player == NULL) //!< No player has no defined status. 179 179 { 180 ThrowException(Argument, "The input ControllableEntity* is NULL.");181 } 182 183 std::map< ControllableEntity*, questStatus::Enum>::const_iterator it = this->playerStatus_.find((ControllableEntity*)(void*)player); //Thx. to x3n for the (ControllableEntity*)(void*) 'hack'.180 ThrowException(Argument, "The input PlayerInfo* is NULL."); 181 } 182 183 std::map<const PlayerInfo*, questStatus::Enum>::const_iterator it = this->playerStatus_.find(player); 184 184 if (it != this->playerStatus_.end()) //!< If there is a player in the map. 185 185 { … … 201 201 Returns false if player is NULL. 202 202 */ 203 bool LocalQuest::setStatus( ControllableEntity* player, const questStatus::Enum & status)203 bool LocalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status) 204 204 { 205 205 if(player == NULL) //!< We can't set a status for no player.
Note: See TracChangeset
for help on using the changeset viewer.