Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 1:07:27 AM (15 years ago)
Author:
dafrick
Message:

Merging the QuestSystem branch to the trunk. Let's hope, this isn't a 'third time's the charm'-thing…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/quest/QuestDescription.cc

    r2896 r2909  
    2828
    2929/**
    30     @file
     30    @file QuestDescription.cc
    3131    @brief Implementation of the QuestDescription class.
    3232*/
     
    3737
    3838#include "core/CoreIncludes.h"
    39 #include "orxonox/overlays/notifications/Notification.h"
     39#include "QuestNotification.h"
    4040
    4141namespace orxonox
     
    8989    @return
    9090        Returns true if successful.
     91    @todo
     92        Make sure the messages meet the conditions.
    9193    */
    9294    bool QuestDescription::notificationHelper(const std::string & item, const std::string & status) const
    9395    {
    9496        std::string message = "";
    95         std::string title = "";
    9697        if(item == "hint")
    9798        {
    98             title = "You received a hint: '" + this->title_ + "'";
    99             message = this->description_;
     99            message = "You received a hint: '" + this->title_ + "'";
    100100        }
    101101        else if(item == "quest")
     
    103103            if(status == "start")
    104104            {
    105                 title = "You received a new quest: '" + this->title_ + "'";
    106                 message = this->description_;
     105                message = "You received a new quest: '" + this->title_ + "'";
    107106            }
    108107            else if(status == "fail")
    109108            {
    110                 title = "You failed the quest: '" + this->title_ + "'";
    111                 message = this->failMessage_;
     109                message = "You failed the quest: '" + this->title_ + "'";
    112110            }
    113111            else if(status == "complete")
    114112            {
    115                 title = "You successfully completed the quest: '" + this->title_ + "'";
    116                 message = this->completeMessage_;
     113                message = "You successfully completed the quest: '" + this->title_ + "'";
    117114            }
    118115            else
     
    128125        }
    129126       
    130         Notification* notification = new Notification(0, message, title, 30);
     127        QuestNotification* notification = new QuestNotification(message);
    131128        notification->send();
    132129        return true;
Note: See TracChangeset for help on using the changeset viewer.