Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 4:19:44 PM (15 years ago)
Author:
dafrick
Message:

Merged questsystem3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/quest/Quest.h

    r2371 r2385  
    2929/**
    3030    @file Quest.h
    31     @brief
    32     Definition of the Quest class.
    33    
    34     The Quest is the parent class of LocalQuest and GlobalQuest.
     31    @brief Definition of the Quest class.
     32        The Quest is the parent class of LocalQuest and GlobalQuest.
    3533*/
    3634 
     
    9088                { return this->parentQuest_; }
    9189               
    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.
     90            /**
     91            @brief Returns the list of subquests.
     92            @return Returns a reference to the list of subquests of the quest.
     93            */
     94            inline const std::list<Quest*> & getSubQuestList(void) const
     95                { return this->subQuests_; }
     96
     97            /**
     98            @brief Returns the list of all QuestHints of this Quest.
     99            @return Returns a reference to the list of QuestHints of the Quest.
     100            */
     101            inline const std::list<QuestHint*> & getHintsList(void) const
     102                { return this->hints_; }
     103       
     104            bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
     105            bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
     106            bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
     107            bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
     108       
     109            bool start(PlayerInfo* player); //!< Sets a Quest to active.
     110            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
     111            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
     112       
     113            bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest.
    114114
    115115        protected:
     
    131131                { return this->failEffects_; }
    132132               
    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)
     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)
    138138                { return this->completeEffects_; }
    139139
     
    141141            virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
    142142           
    143     private:
     143        private:
    144144            Quest* parentQuest_; //!< Pointer to the parentquest.
    145145            std::list<Quest*> subQuests_; //!< List of all the subquests.
     
    149149            std::list<QuestEffect*> failEffects_; //!< A list of all QuestEffects to be invoked, when the Quest has been failed.
    150150            std::list<QuestEffect*> completeEffects_; //!< A list of QuestEffects to be invoked, when the Quest has been completed.
     151           
     152            std::list<QuestListener*> listeners_; //!< A list of QuestListeners, that listen to what exactly happens with this Quest.
    151153           
    152154            bool setParentQuest(Quest* quest); //!< Sets the parentquest of the Quest.
Note: See TracChangeset for help on using the changeset viewer.