Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 25, 2008, 11:56:40 PM (15 years ago)
Author:
landauf
Message:

merged questsystem2 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc

    r2105 r2261  
    2727 */
    2828
     29/**
     30    @file ChangeQuestStatus.cc
     31    @brief
     32    Implementation of the ChangeQuestStatus class.
     33*/
     34
    2935#include "OrxonoxStableHeaders.h"
    3036#include "ChangeQuestStatus.h"
     
    3642namespace orxonox {
    3743
     44    /**
     45    @brief
     46        Constructor. Registers the object.
     47    */
    3848    ChangeQuestStatus::ChangeQuestStatus(BaseObject* creator) : QuestEffect(creator)
    3949    {
     
    4959    }
    5060
    51     void ChangeQuestStatus::setQuestId(const std::string & id)
    52     {
    53         if(!QuestItem::isId(id))
    54         {
    55             COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
    56             return;
    57         }
    58         this->questId_ = id;
    59     }
    60 
     61    /**
     62    @brief
     63        Method for creating a ChangeQuestStatus object through XML.
     64    */
    6165    void ChangeQuestStatus::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    6266    {
     
    6670    }
    6771
     72    /**
     73    @brief
     74        Sets the id of the Quest the Questffect changes the status of.
     75    @param id
     76        The id of the Quest.
     77    @return
     78        Returns true if successful.
     79    */
     80    bool ChangeQuestStatus::setQuestId(const std::string & id)
     81    {
     82        if(!QuestItem::isId(id))
     83        {
     84            COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
     85            return false;
     86        }
     87       
     88        this->questId_ = id;
     89        return true;
     90    }
     91
    6892}
Note: See TracChangeset for help on using the changeset viewer.