Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2008, 9:52:12 AM (16 years ago)
Author:
dafrick
Message:

Started with XMLPort…

File:
1 edited

Legend:

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

    r2043 r2068  
    5858    @brief
    5959        Represents a quest in the game.
    60         A quest has a sub
    61        
     60        A quest has a list of subquests and a parentquest (if it is not a rootquest).
     61        Each quest exists only once but it has a different status (inactive, active, failed or completed) for each player.
    6262    @author
    6363        Damian 'Mozork' Frick
     
    6767        public:
    6868            Quest();
    69             Quest(std::string id, std::string title = "", std::string description = "");
     69            Quest(std::string id);
    7070            virtual ~Quest();
    7171   
     
    7575                { return this->subQuests_; }
    7676           
    77             //TDO: Necessary? Shouldn't this be decided whilest creating the object?
    78             //     Yes it absolutely should and will. Add these methods to protected then?
    79             bool setParentQuest(Quest* quest); //!< Sets the parent quest of the quest.
    80             bool addSubQuest(Quest* quest); //!< Adds a sub quest to the quest.
    81            
    82             inline bool isInactive(const Player* player) const //!< Returns true if the quest status for the specific player is 'inactive'.
    83                { return this->getStatus(player) == questStatus::inactive; }
    84             inline bool isActive(const Player* player) const //!< Returns true if the quest status for the specific player is 'active'.
    85                { return this->getStatus(player) == questStatus::active; }
    86             inline bool isFailed(const Player* player) const //!< Returns true if the quest status for the specific player is 'failed'.
    87                { return this->getStatus(player) == questStatus::failed; }
    88             inline bool isCompleted(const Player* player) const //!< Returns true if the quest status for the specific player is 'completed'.
    89                { return this->getStatus(player) == questStatus::completed; }
     77            bool isInactive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
     78            bool isActive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'active'.
     79            bool isFailed(const Player* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
     80            bool isCompleted(const Player* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
    9081               
    9182            bool start(Player* player); //!< Sets a quest to active.
     
    9384            bool complete(Player* player); //!< Completes the quest.
    9485               
    95             void addHint(QuestHint* hint); //!< Add a hint to the list of hints.
     86            bool addHint(QuestHint* hint); //!< Add a hint to the list of hints.
    9687           
    9788        protected:
     
    10293            virtual bool isCompletable(const Player* player) const = 0; //!< Checks whether the quest can be completed.
    10394           
    104             //TDO: Get the parameter const...
     95            bool setParentQuest(Quest* quest); //!< Sets the parent quest of the quest.
     96            bool addSubQuest(Quest* quest); //!< Adds a sub quest to the quest.
     97           
    10598            virtual questStatus::Enum getStatus(const Player* player) const = 0; //!< Returns the status of the quest for a specific player.
    10699            virtual bool setStatus(Player* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
Note: See TracChangeset for help on using the changeset viewer.