Index: code/branches/bugger/src/orxonox/objects/quest/Quest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/Quest.h	(revision 2531)
+++ code/branches/bugger/src/orxonox/objects/quest/Quest.h	(revision 2533)
@@ -28,9 +28,7 @@
  
 /**
-    @file Quest.h
-    @brief
-    Definition of the Quest class.
-    
-    The Quest is the parent class of LocalQuest and GlobalQuest.
+    @file
+    @brief Definition of the Quest class.
+        The Quest is the parent class of LocalQuest and GlobalQuest.
 */
  
@@ -47,19 +45,19 @@
 #include "QuestItem.h"
 
-namespace questStatus
+namespace orxonox
 {
+    namespace questStatus
+    {
 
-    //!Different states of a Quest.
-    enum Enum
-    {
-        inactive,
-        active,
-        failed,
-        completed
-    };
+        //!Different states of a Quest.
+        enum Enum
+        {
+            inactive,
+            active,
+            failed,
+            completed
+        };
 
-}
-
-namespace orxonox {
+    }
 
     /**
@@ -90,26 +88,28 @@
                 { return this->parentQuest_; }
                 
-	    /**
-	    @brief Returns the list of subquests.
-	    @return Returns a reference to the list of subquests of the quest.
-	    */
-	    inline const std::list<Quest*> & getSubQuestList(void) const
-		{ return this->subQuests_; }
-		    
-	    /**
-	    @brief Returns the list of all QuestHints of this Quest.
-	    @return Returns a reference to the list of QuestHints of the Quest.
-	    */
-	    inline const std::list<QuestHint*> & getHintsList(void) const
-		{ return this->hints_; }
-	    
-	    bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
-	    bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
-	    bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
-	    bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
-	    
-	    bool start(PlayerInfo* player); //!< Sets a Quest to active.
-	    virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest.
-	    virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest.
+            /**
+            @brief Returns the list of subquests.
+            @return Returns a reference to the list of subquests of the quest.
+            */
+            inline const std::list<Quest*> & getSubQuestList(void) const
+                { return this->subQuests_; }
+
+            /**
+            @brief Returns the list of all QuestHints of this Quest.
+            @return Returns a reference to the list of QuestHints of the Quest.
+            */
+            inline const std::list<QuestHint*> & getHintsList(void) const
+                { return this->hints_; }
+        
+            bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
+            bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
+            bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
+            bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
+        
+            bool start(PlayerInfo* player); //!< Sets a Quest to active.
+            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
+            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
+        
+            bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest.
 
         protected:
@@ -131,9 +131,9 @@
                 { return this->failEffects_; }
                 
-	    /**
-	    @brief Returns the list of complete QuestEffects.
-	    @return Returns a reference to the list of complete QuestEffects.
-	    */
-	    inline std::list<QuestEffect*> & getCompleteEffectList(void)
+            /**
+            @brief Returns the list of complete QuestEffects.
+            @return Returns a reference to the list of complete QuestEffects.
+            */
+            inline std::list<QuestEffect*> & getCompleteEffectList(void)
                 { return this->completeEffects_; }
 
@@ -141,5 +141,5 @@
             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
             
-    private:
+        private:
             Quest* parentQuest_; //!< Pointer to the parentquest.
             std::list<Quest*> subQuests_; //!< List of all the subquests.
@@ -149,4 +149,6 @@
             std::list<QuestEffect*> failEffects_; //!< A list of all QuestEffects to be invoked, when the Quest has been failed.
             std::list<QuestEffect*> completeEffects_; //!< A list of QuestEffects to be invoked, when the Quest has been completed.
+            
+            std::list<QuestListener*> listeners_; //!< A list of QuestListeners, that listen to what exactly happens with this Quest.
             
             bool setParentQuest(Quest* quest); //!< Sets the parentquest of the Quest.
