Changeset 8891 for code/trunk/src/modules/questsystem
- Timestamp:
- Oct 12, 2011, 7:50:43 PM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/src/modules/questsystem/QuestItem.h
r7552 r8891 105 105 QuestDescription* description_; //!< The QuestDescription of the QuestItem. 106 106 107 bool registered_; 107 bool registered_; //!< Whether the QuestItem is registered with the QuestManager. 108 108 109 109 }; -
code/trunk/src/modules/questsystem/QuestManager.cc
r8858 r8891 35 35 36 36 #include "util/Exception.h" 37 #include "util/OrxAssert.h" 37 38 #include "util/ScopedSingletonManager.h" 38 39 #include "core/command/ConsoleCommand.h" … … 60 61 { 61 62 RegisterRootObject(QuestManager); 62 63 63 orxout(internal_info, context::quests) << "QuestManager created." << endl; 64 64 } … … 95 95 bool QuestManager::registerQuest(Quest* quest) 96 96 { 97 assert(quest); 97 if(quest == NULL) 98 { 99 COUT(1) << "Quest pointer is NULL." << endl; 100 return false; 101 } 98 102 99 103 std::pair<std::map<std::string, Quest*>::iterator,bool> result; … … 133 137 bool QuestManager::registerHint(QuestHint* hint) 134 138 { 135 assert(hint); 139 if(hint == NULL) 140 { 141 COUT(1) << "Hint pointer is NULL." << endl; 142 return false; 143 } 136 144 137 145 std::pair<std::map<std::string, QuestHint*>::iterator,bool> result; … … 361 369 Quest* QuestManager::getParentQuest(Quest* quest) 362 370 { 371 OrxAssert(quest, "The input Quest is NULL."); 363 372 return quest->getParentQuest(); 364 373 } … … 374 383 QuestDescription* QuestManager::getDescription(Quest* item) 375 384 { 385 OrxAssert(item, "The input Quest is NULL."); 376 386 return item->getDescription(); 377 387 } … … 387 397 QuestDescription* QuestManager::getDescription(QuestHint* item) 388 398 { 399 OrxAssert(item, "The input QuestHint is NULL."); 389 400 return item->getDescription(); 390 401 } … … 400 411 const std::string QuestManager::getId(Quest* item) const 401 412 { 413 OrxAssert(item, "The input Quest is NULL."); 402 414 return item->getId(); 403 415 } … … 413 425 const std::string QuestManager::getId(QuestHint* item) const 414 426 { 427 OrxAssert(item, "The input QuestHint is NULL."); 415 428 return item->getId(); 416 429 }
Note: See TracChangeset
for help on using the changeset viewer.