- Timestamp:
- Mar 12, 2009, 5:13:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5/src/orxonox/objects/quest/QuestDescription.cc
r2710 r2779 28 28 29 29 /** 30 @file 30 @file QuestDescription.cc 31 31 @brief Implementation of the QuestDescription class. 32 32 */ … … 37 37 38 38 #include "core/CoreIncludes.h" 39 #include " orxonox/overlays/notifications/Notification.h"39 #include "QuestNotification.h" 40 40 41 41 namespace orxonox … … 89 89 @return 90 90 Returns true if successful. 91 @todo 92 Make sure the messages meet the conditions. 91 93 */ 92 94 bool QuestDescription::notificationHelper(const std::string & item, const std::string & status) const 93 95 { 94 96 std::string message = ""; 95 std::string title = "";96 97 if(item == "hint") 97 98 { 98 title = "You received a hint: '" + this->title_ + "'"; 99 message = this->description_; 99 message = "You received a hint: '" + this->title_ + "'"; 100 100 } 101 101 else if(item == "quest") … … 103 103 if(status == "start") 104 104 { 105 title = "You received a new quest: '" + this->title_ + "'"; 106 message = this->description_; 105 message = "You received a new quest: '" + this->title_ + "'"; 107 106 } 108 107 else if(status == "fail") 109 108 { 110 title = "You failed the quest: '" + this->title_ + "'"; 111 message = this->failMessage_; 109 message = "You failed the quest: '" + this->title_ + "'"; 112 110 } 113 111 else if(status == "complete") 114 112 { 115 title = "You successfully completed the quest: '" + this->title_ + "'"; 116 message = this->completeMessage_; 113 message = "You successfully completed the quest: '" + this->title_ + "'"; 117 114 } 118 115 else … … 128 125 } 129 126 130 Notification* notification = new Notification(0, message, title, 30);127 QuestNotification* notification = new QuestNotification(message); 131 128 notification->send(); 132 129 return true;
Note: See TracChangeset
for help on using the changeset viewer.