Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 1, 2008, 8:32:10 PM (16 years ago)
Author:
landauf
Message:
  • adopted quest classes to the new hierarchy (with a creator pointer)
  • added "RegisterObject(…)" in all constructors and "virtual" to all destructors
File:
1 edited

Legend:

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

    r2091 r2092  
    6767    {
    6868        public:
    69             Quest();
     69            Quest(BaseObject* creator);
    7070            virtual ~Quest();
    71            
     71
    7272            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    73    
     73
    7474            inline Quest* getParentQuest(void) const //!< Returns the parent quest of the quest.
    7575                { return this->parentQuest_; }
    7676            inline const std::list<Quest*> & getSubQuestList(void) const //!< Returns the list of sub quests.
    7777                { return this->subQuests_; }
    78            
     78
    7979            bool isInactive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
    8080            bool isActive(const Player* player) const; //!< Returns true if the quest status for the specific player is 'active'.
    8181            bool isFailed(const Player* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
    8282            bool isCompleted(const Player* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
    83                
     83
    8484            bool start(Player* player); //!< Sets a quest to active.
    8585            bool fail(Player* player); //!< Fails the quest.
    8686            bool complete(Player* player); //!< Completes the quest.
    87            
     87
    8888        protected:
    8989            void initialize(void); //!< Initialized the object.
    90            
     90
    9191            virtual bool isStartable(const Player* player) const = 0; //!< Checks whether the quest can be started.
    9292            virtual bool isFailable(const Player* player) const = 0; //!< Checks whether the quest can be failed.
    9393            virtual bool isCompletable(const Player* player) const = 0; //!< Checks whether the quest can be completed.
    94            
     94
    9595            bool setParentQuest(Quest* quest); //!< Sets the parent quest of the quest.
    9696            bool addSubQuest(Quest* quest); //!< Adds a sub quest to the quest.
     
    9898            bool addFailEffect(QuestEffect* effect);
    9999            bool addCompleteEffect(QuestEffect* effect);
    100            
     100
    101101            const Quest* getParentQuest(void);
    102102            const Quest* getSubQuests(unsigned int index) const;
     
    104104            const QuestEffect* getFailEffects(unsigned int index) const;
    105105            const QuestEffect* getCompleteEffects(unsigned int index) const;
    106            
     106
    107107            virtual questStatus::Enum getStatus(const Player* player) const = 0; //!< Returns the status of the quest for a specific player.
    108108            virtual bool setStatus(Player* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
    109            
     109
    110110            Quest* parentQuest_; //!< Pointer to the parent quest.
    111111            std::list<Quest*> subQuests_; //!< List of all the sub quests.
    112            
     112
    113113            std::list<QuestHint*> hints_; //!< A list of all the hints tied to this quest.
    114            
     114
    115115            std::list<QuestEffect*> failEffects_; //!< A list of all effects to be invoked, when the quest has been failed.
    116116            std::list<QuestEffect*> completeEffects_; //!< A list of effects to be invoked, when the quest has been completed.
Note: See TracChangeset for help on using the changeset viewer.