Changeset 2258
- Timestamp:
- Nov 25, 2008, 8:39:00 AM (16 years ago)
- Location:
- code/branches/questsystem2/src/orxonox/objects/quest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.cc
r2251 r2258 147 147 bool GlobalQuest::isStartable(const PlayerInfo* player) const 148 148 { 149 if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player))) 150 { 151 return false; 152 } 149 153 return (this->isInactive(player) && !(this->status_ == questStatus::completed || this->status_ == questStatus::failed)); 150 154 } -
code/branches/questsystem2/src/orxonox/objects/quest/LocalQuest.cc
r2251 r2258 131 131 bool LocalQuest::isStartable(const PlayerInfo* player) const 132 132 { 133 if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player))) 134 { 135 return false; 136 } 133 137 return this->isInactive(player); 134 138 } -
code/branches/questsystem2/src/orxonox/objects/quest/Quest.h
r2251 r2258 90 90 { return this->parentQuest_; } 91 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 92 /** 93 @brief Returns the list of subquests. 94 @return Returns a reference to the list of subquests of the quest. 95 */ 96 inline const std::list<Quest*> & getSubQuestList(void) const 97 { return this->subQuests_; } 98 99 /** 100 @brief Returns the list of all QuestHints of this Quest. 101 @return Returns a reference to the list of QuestHints of the Quest. 102 */ 103 inline const std::list<QuestHint*> & getHintsList(void) const 104 { return this->hints_; } 105 106 bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'. 107 bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'. 108 bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'. 109 bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'. 110 111 bool start(PlayerInfo* player); //!< Sets a Quest to active. 112 virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest. 113 virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest. 114 114 115 115 protected: … … 131 131 { return this->failEffects_; } 132 132 133 134 135 136 137 133 /** 134 @brief Returns the list of complete QuestEffects. 135 @return Returns a reference to the list of complete QuestEffects. 136 */ 137 inline std::list<QuestEffect*> & getCompleteEffectList(void) 138 138 { return this->completeEffects_; } 139 139
Note: See TracChangeset
for help on using the changeset viewer.