Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2353 for code/branches


Ignore:
Timestamp:
Dec 7, 2008, 11:44:17 PM (16 years ago)
Author:
dafrick
Message:

Forgot to complie - which it didn't due to some leftovers from the parameter conversion.
But it does now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem3/src/orxonox/objects/quest/QuestListener.cc

    r2352 r2353  
    5353        RegisterObject(QuestListener);
    5454       
    55         this->status_ = questListenerMode::all;
     55        this->mode_ = questListenerMode::all;
    5656        this->quest_ = NULL;
    5757    }
     
    7878        this->quest_->addListener(this); //!< Adds the QuestListener to the Quests list of listeners.
    7979       
    80         COUT(3) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getQuestStatus() << "'." << std::endl;
     80        COUT(3) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << std::endl;
    8181    }
    8282   
     
    9494        {
    9595            QuestListener* listener = *it;
    96             if(listener->getMode() == status || listener->getMode() == questListenerMode::all) //!< Check whether the status change affects the give QuestListener.
     96            if(listener->getMode() == status || listener->getMode() == "all") //!< Check whether the status change affects the give QuestListener.
    9797            {
    9898                listener->execute();
     
    132132    bool QuestListener::setMode(const std::string & mode)
    133133    {
    134         if(status == "all")
    135         {
    136             this->status_ = questListenerMode::all;
    137         }
    138         else if(status == "start")
    139         {
    140             this->status_ = questListenerMode::start;
    141         }
    142         else if(status == "fail")
    143         {
    144             this->status_ = questListenerMode::fail;
    145         }
    146         else if(status == "complete")
    147         {
    148             this->status_ = questListenerMode::complete;
     134        if(mode == "all")
     135        {
     136            this->mode_ = questListenerMode::all;
     137        }
     138        else if(mode == "start")
     139        {
     140            this->mode_ = questListenerMode::start;
     141        }
     142        else if(mode == "fail")
     143        {
     144            this->mode_ = questListenerMode::fail;
     145        }
     146        else if(mode == "complete")
     147        {
     148            this->mode_ = questListenerMode::complete;
    149149        }
    150150        else
    151151        {
    152152            COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;
    153             this->status_ = questListenerMode::all;
     153            this->mode_ = questListenerMode::all;
    154154            return false;
    155155        }
     
    166166    const std::string QuestListener::getMode(void)
    167167    {
    168         if(this->status_ == questListenerMode::all)
     168        if(this->mode_ == questListenerMode::all)
    169169        {
    170170            return "all";
    171171        }
    172         else if(this->status_ == questListenerMode::start)
     172        else if(this->mode_ == questListenerMode::start)
    173173        {
    174174            return "start";
    175175        }
    176         else if(this->status_ == questListenerMode::fail)
     176        else if(this->mode_ == questListenerMode::fail)
    177177        {
    178178            return "fail";
    179179        }
    180         else if(this->status_ == questListenerMode::complete)
     180        else if(this->mode_ == questListenerMode::complete)
    181181        {
    182182            return "complete";
Note: See TracChangeset for help on using the changeset viewer.