Changeset 10997
- Timestamp:
- Dec 30, 2015, 12:21:18 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/modules/questsystem
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc
r10916 r10997 177 177 The player. 178 178 */ 179 QuestStatus ::ValueGlobalQuest::getStatus(const PlayerInfo* player) const179 QuestStatus GlobalQuest::getStatus(const PlayerInfo* player) const 180 180 { 181 181 assert(player); … … 200 200 Returns false if player is nullptr. 201 201 */ 202 bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus ::Value& status)202 bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus & status) 203 203 { 204 204 assert(player); -
code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.h
r10817 r10997 103 103 virtual bool isCompletable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be completed. 104 104 105 virtual QuestStatus ::ValuegetStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player.105 virtual QuestStatus getStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player. 106 106 107 virtual bool setStatus(PlayerInfo* player, const QuestStatus ::Value& status) override; //!< Sets the status for a specific player.107 virtual bool setStatus(PlayerInfo* player, const QuestStatus & status) override; //!< Sets the status for a specific player. 108 108 109 109 private: 110 110 std::set<PlayerInfo*> players_; //!< The set of players which possess this Quest. 111 QuestStatus ::Valuestatus_; //!< The status of this Quest.111 QuestStatus status_; //!< The status of this Quest. 112 112 std::list<QuestEffect*> rewards_; //!< Reward QuestEffects only invoked on the player completing the Quest. 113 113 -
code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.cc
r10765 r10997 168 168 Returns the status of the Quest for the input player. 169 169 */ 170 QuestStatus ::ValueLocalQuest::getStatus(const PlayerInfo* player) const170 QuestStatus LocalQuest::getStatus(const PlayerInfo* player) const 171 171 { 172 172 assert(player); 173 173 174 std::map<const PlayerInfo*, QuestStatus ::Value>::const_iterator it = this->playerStatus_.find(player);174 std::map<const PlayerInfo*, QuestStatus>::const_iterator it = this->playerStatus_.find(player); 175 175 if (it != this->playerStatus_.end()) // If there is a player in the map. 176 176 return it->second; … … 190 190 Returns false if player is nullptr. 191 191 */ 192 bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus ::Value& status)192 bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus & status) 193 193 { 194 194 assert(player); -
code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.h
r10817 r10997 97 97 virtual bool isCompletable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be completed. 98 98 99 virtual QuestStatus ::ValuegetStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player.100 virtual bool setStatus(PlayerInfo* player, const QuestStatus ::Value& status) override; //!< Sets the status for a specific player.99 virtual QuestStatus getStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player. 100 virtual bool setStatus(PlayerInfo* player, const QuestStatus & status) override; //!< Sets the status for a specific player. 101 101 102 102 private: 103 std::map<const PlayerInfo*, QuestStatus ::Value> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.103 std::map<const PlayerInfo*, QuestStatus> playerStatus_; //!< List of the status for each player, with the Player-pointer as key. 104 104 105 105 }; -
code/branches/cpp11_v2/src/modules/questsystem/Quest.h
r10817 r10997 51 51 @ingroup Questsystem 52 52 */ 53 namespaceQuestStatus53 enum class QuestStatus 54 54 { 55 enum Value 56 { 57 Inactive, //!< The @ref orxonox::Quest "Quest" is inactive. 58 Active, //!< The @ref orxonox::Quest "Quest" is active. 59 Failed, //!< The @ref orxonox::Quest "Quest" has been failed. 60 Completed //!< The @ref orxonox::Quest "Quest" has been completed. 61 }; 62 } 55 Inactive, //!< The @ref orxonox::Quest "Quest" is inactive. 56 Active, //!< The @ref orxonox::Quest "Quest" is active. 57 Failed, //!< The @ref orxonox::Quest "Quest" has been failed. 58 Completed //!< The @ref orxonox::Quest "Quest" has been completed. 59 }; 63 60 64 61 /** … … 143 140 { return this->completeEffects_; } 144 141 145 virtual QuestStatus ::ValuegetStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.146 virtual bool setStatus(PlayerInfo* player, const QuestStatus ::Value& status) = 0; //!< Changes the status for a specific player.142 virtual QuestStatus getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player. 143 virtual bool setStatus(PlayerInfo* player, const QuestStatus & status) = 0; //!< Changes the status for a specific player. 147 144 148 145 private: -
code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.h
r10817 r10997 50 50 @ingroup Questsystem 51 51 */ 52 namespaceQuestEffectBeaconStatus52 enum class QuestEffectBeaconStatus 53 53 { 54 enum Value 55 { 56 Inactive, //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is inactive. 57 Active //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is active. 58 }; 59 } 54 Inactive, //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is inactive. 55 Active //!< The @ref orxonox::QuestEffectBeacon "QuestEffectBeacon" is active. 56 }; 60 57 61 58 /** … … 125 122 std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player. 126 123 int times_; //!< Number of times the beacon can be exectued. 127 QuestEffectBeaconStatus ::Valuestatus_; //!< The status of the QuestEffectBeacon, Can be eighter active or inactive.124 QuestEffectBeaconStatus status_; //!< The status of the QuestEffectBeacon, Can be eighter active or inactive. 128 125 129 126 bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed. -
code/branches/cpp11_v2/src/modules/questsystem/QuestHint.cc
r10765 r10997 92 92 93 93 // Find the player. 94 std::map<const PlayerInfo*, QuestHintStatus ::Value>::const_iterator it = this->playerStatus_.find(player);94 std::map<const PlayerInfo*, QuestHintStatus>::const_iterator it = this->playerStatus_.find(player); 95 95 if (it != this->playerStatus_.end()) // If the player is in the map. 96 return it->second;96 return (it->second == QuestHintStatus::Active); 97 97 98 return QuestStatus::Inactive;98 return false; 99 99 } 100 100 -
code/branches/cpp11_v2/src/modules/questsystem/QuestHint.h
r10817 r10997 50 50 @ingroup Questsystem 51 51 */ 52 namespaceQuestHintStatus52 enum class QuestHintStatus 53 53 { 54 enum Value 55 { 56 Inactive, //!< The @ref orxonox::QuestHint "QuestHint" is inactive. 57 Active //!< The @ref orxonox::QuestHint "QuestHint" is active. 58 }; 59 } 54 Inactive, //!< The @ref orxonox::QuestHint "QuestHint" is inactive. 55 Active //!< The @ref orxonox::QuestHint "QuestHint" is active. 56 }; 60 57 61 58 /** … … 101 98 private: 102 99 Quest* quest_; //!< The Quest the QuestHint belongs to. 103 std::map<const PlayerInfo*, QuestHintStatus ::Value> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.100 std::map<const PlayerInfo*, QuestHintStatus> playerStatus_; //!< List of the states for each player, with the Player-pointer as key. 104 101 105 102 }; // tolua_export -
code/branches/cpp11_v2/src/modules/questsystem/QuestListener.h
r10817 r10997 50 50 @ingroup Questsystem 51 51 */ 52 namespaceQuestListenerMode52 enum class QuestListenerMode 53 53 { 54 enum Value 55 { 56 All, //!< Listens to all events. 57 Start, //!< Only listens to events pertaining the starting of @ref orxonox::Quest "Quests". 58 Fail, //!< Only listens to events pertaining the failing of @ref orxonox::Quest "Quests". 59 Complete //!< Only listens to events pertaining the completing of @ref orxonox::Quest "Quests". 60 }; 61 } 54 All, //!< Listens to all events. 55 Start, //!< Only listens to events pertaining the starting of @ref orxonox::Quest "Quests". 56 Fail, //!< Only listens to events pertaining the failing of @ref orxonox::Quest "Quests". 57 Complete //!< Only listens to events pertaining the completing of @ref orxonox::Quest "Quests". 58 }; 62 59 63 60 /** … … 103 100 104 101 private: 105 QuestListenerMode ::Valuemode_; //!< The mode of the QuestListener.102 QuestListenerMode mode_; //!< The mode of the QuestListener. 106 103 Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to. 107 104
Note: See TracChangeset
for help on using the changeset viewer.