Index: code/branches/questsystem/src/orxonox/objects/Quest.cc
===================================================================
--- code/branches/questsystem/src/orxonox/objects/Quest.cc	(revision 2021)
+++ code/branches/questsystem/src/orxonox/objects/Quest.cc	(revision 2068)
@@ -30,4 +30,5 @@
 
 #include "Quest.h"
+#include "QuestManager.h"
 
 namespace orxonox {
@@ -35,5 +36,5 @@
     Quest::Quest() : QuestItem()
     {
-        
+        this->initialize();
     }
 
@@ -48,7 +49,7 @@
         The description of the quest.
     */
-    Quest::Quest(std::string id, std::string title, std::string description) : QuestItem(id, title, description)
-    {
-        initialize();
+    Quest::Quest(std::string id) : QuestItem(id)
+    {
+        this->initialize();
     }
     
@@ -59,5 +60,5 @@
     Quest::~Quest()
     {
-        //TDO: Unload lists...
+        
     }
     
@@ -70,5 +71,6 @@
         RegisterObject(Quest);
         
-        this->parentQuest_ = 0;
+        this->parentQuest_ = NULL;
+        QuestManager::registerQuest(this); //Registers the quest with the QuestManager.
     }
 
@@ -78,7 +80,15 @@
     @param quest
         A pointer to the quest to be set as parent quest.
+    @return
+        Returns true if the parentQuest could be set.
     */
     bool Quest::setParentQuest(Quest* quest)
     {
+        if(quest == NULL)
+        {
+            COUT(2) << "The parentquest to be added to quest {" << this->getId() << "} was NULL." << std::endl;
+            return false;
+        }
+        
         this->parentQuest_ = quest;
         return true;
@@ -90,9 +100,78 @@
     @param quest
         A pointer to the quest to be set as sub quest.
+    @return
+        Returns true if the subQuest vould be set.
     */
     bool Quest::addSubQuest(Quest* quest)
     {
+        if(quest == NULL)
+        {
+            COUT(2) << "The subquest to be added to quest {" << this->getId() << "} was NULL." << std::endl;
+            return false;
+        }
+        
         this->subQuests_.push_back(quest);
         return true;
+    }
+    
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'inactive'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'inactive'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isInactive(const Player* player) const
+    {
+        return this->getStatus(player) == questStatus::inactive;
+    }
+    
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'active'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'active'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isActive(const Player* player) const
+    {
+
+        return this->getStatus(player) == questStatus::active;
+    }
+    
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'failed'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'failed'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isFailed(const Player* player) const
+    {
+        return this->getStatus(player) == questStatus::failed;
+    }
+    
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'completed'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'completed'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isCompleted(const Player* player) const
+    {
+        return this->getStatus(player) == questStatus::completed;
     }
 
@@ -102,16 +181,18 @@
     @param hint
         The hint that should be added to the list of hints.
-    */
-    void Quest::addHint(QuestHint* hint)
-    {
-        if ( hint != NULL )
-        {
-            this->hints_.push_back(hint);
-            hint->setQuest(this);
-	}
-        else
+    @return
+        Returns true if the hint was successfully added.
+    */
+    bool Quest::addHint(QuestHint* hint)
+    {
+        if(hint == NULL)
         {
             COUT(2) << "A NULL-QuestHint was trying to be added." << std::endl;
-	}
+            return false;
+        }
+        
+	this->hints_.push_back(hint);
+	hint->setQuest(this);
+	return true;
     }
     
