Changeset 8858 for code/trunk/src/modules/questsystem
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/modules/questsystem/GlobalQuest.cc
r7552 r8858 71 71 XMLPortObject(GlobalQuest, QuestEffect, "reward-effects", addRewardEffect, getRewardEffects, xmlelement, mode); 72 72 73 COUT(4) << "New GlobalQuest {" << this->getId() << "} created." << std::endl;73 orxout(verbose, context::quests) << "New GlobalQuest {" << this->getId() << "} created." << endl; 74 74 } 75 75 … … 87 87 if(!this->isFailable(player)) // Check whether the Quest can be failed. 88 88 { 89 COUT(4) << "A non-completable quest was trying to be failed." << std::endl;89 orxout(verbose, context::quests) << "A non-completable quest was trying to be failed." << endl; 90 90 return false; 91 91 } … … 114 114 if(!this->isCompletable(player)) // Check whether the Quest can be completed. 115 115 { 116 COUT(4) << "A non-completable quest was trying to be completed." << std::endl;116 orxout(verbose, context::quests) << "A non-completable quest was trying to be completed." << endl; 117 117 return false; 118 118 } … … 227 227 this->rewards_.push_back(effect); // Add the QuestEffect to the list. 228 228 229 COUT(4) << "Reward effect was added to Quest {" << this->getId() << "}." << std::endl;229 orxout(verbose, context::quests) << "Reward effect was added to Quest {" << this->getId() << "}." << endl; 230 230 return true; 231 231 } -
code/trunk/src/modules/questsystem/LocalQuest.cc
r7552 r8858 69 69 SUPER(LocalQuest, XMLPort, xmlelement, mode); 70 70 71 COUT(4) << "New LocalQuest {" << this->getId() << "} created." << std::endl;71 orxout(verbose, context::quests) << "New LocalQuest {" << this->getId() << "} created." << endl; 72 72 } 73 73 … … 85 85 if(!this->isFailable(player)) // Checks whether the quest can be failed. 86 86 { 87 COUT(4) << "A non-failable quest was trying to be failed." << std::endl;87 orxout(verbose, context::quests) << "A non-failable quest was trying to be failed." << endl; 88 88 return false; 89 89 } … … 108 108 if(!this->isCompletable(player)) // Checks whether the Quest can be completed. 109 109 { 110 COUT(4) << "A non-completable quest was trying to be completed." << std::endl;110 orxout(verbose, context::quests) << "A non-completable quest was trying to be completed." << endl; 111 111 return false; 112 112 } -
code/trunk/src/modules/questsystem/Quest.cc
r7552 r8858 96 96 this->parentQuest_ = quest; 97 97 98 COUT(4) << "Parent Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl;98 orxout(verbose, context::quests) << "Parent Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << endl; 99 99 return true; 100 100 } … … 115 115 this->subQuests_.push_back(quest); // Adds the Quest to the end of the list of sub-quests. 116 116 117 COUT(4) << "Sub Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl;117 orxout(verbose, context::quests) << "Sub Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << endl; 118 118 return true; 119 119 } … … 135 135 this->hints_.push_back(hint); // Adds the QuestHint to the end of the list of QuestHints. 136 136 137 COUT(4) << "QuestHint {" << hint->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl;137 orxout(verbose, context::quests) << "QuestHint {" << hint->getId() << "} was added to Quest {" << this->getId() << "}." << endl; 138 138 return true; 139 139 } … … 153 153 this->failEffects_.push_back(effect); // Adds the QuestEffect to the end of the list of fail QuestEffects. 154 154 155 COUT(4) << "A FailEffect was added to Quest {" << this->getId() << "}." << std::endl;155 orxout(verbose, context::quests) << "A FailEffect was added to Quest {" << this->getId() << "}." << endl; 156 156 return true; 157 157 } … … 171 171 this->completeEffects_.push_back(effect); // Adds the QuestEffect to the end of the list of complete QuestEffects. 172 172 173 COUT(4) << "A CompleteEffect was added to Quest {" << this->getId() << "}." << std::endl;173 orxout(verbose, context::quests) << "A CompleteEffect was added to Quest {" << this->getId() << "}." << endl; 174 174 return true; 175 175 } … … 341 341 this->setStatus(player, QuestStatus::Failed); 342 342 343 COUT(4) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." <<std::endl;343 orxout(verbose, context::quests) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." << endl; 344 344 345 345 this->getDescription()->sendFailQuestNotification(player); … … 360 360 this->setStatus(player, QuestStatus::Completed); 361 361 362 COUT(4) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." <<std::endl;362 orxout(verbose, context::quests) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." << endl; 363 363 364 364 this->getDescription()->sendCompleteQuestNotification(player); … … 378 378 if(!this->isStartable(player)) // Checks whether the quest can be started. 379 379 { 380 COUT(4) << "A non-startable quest was trying to be started." << std::endl;380 orxout(verbose, context::quests) << "A non-startable quest was trying to be started." << endl; 381 381 return false; 382 382 } 383 383 384 COUT(4) << "Quest {" << this->getId() << "} is started for player: " << player << " ." <<std::endl;384 orxout(verbose, context::quests) << "Quest {" << this->getId() << "} is started for player: " << player << " ." << endl; 385 385 386 386 QuestListener::advertiseStatusChange(this->listeners_, "start"); // Tells the QuestListeners, that the status has changed to active. -
code/trunk/src/modules/questsystem/QuestDescription.cc
r8706 r8858 79 79 XMLPortParam(QuestDescription, "completeMessage", setCompleteMessage, getCompleteMessage, xmlelement, mode); 80 80 81 COUT(4) << "New QuestDescription with title '" << this->getTitle() << "' created." << std::endl;81 orxout(verbose, context::quests) << "New QuestDescription with title '" << this->getTitle() << "' created." << endl; 82 82 } 83 83 … … 109 109 else 110 110 { 111 COUT(2) << "Bad input in notificationHelper, this should not be happening!" << std::endl;111 orxout(internal_warning, context::quests) << "Bad input in notificationHelper, this should not be happening!" << endl; 112 112 return false; 113 113 } … … 115 115 else 116 116 { 117 COUT(2) << "Bad input in notificationHelper, this should not be happening!" << std::endl;117 orxout(internal_warning, context::quests) << "Bad input in notificationHelper, this should not be happening!" << endl; 118 118 return false; 119 119 } -
code/trunk/src/modules/questsystem/QuestEffect.cc
r8351 r8858 70 70 bool temp = true; 71 71 72 COUT(4) << "Invoking QuestEffects on player: " << player << " ." << std::endl;72 orxout(verbose, context::quests) << "Invoking QuestEffects on player: " << player << " ." << endl; 73 73 74 74 for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++) -
code/trunk/src/modules/questsystem/QuestEffectBeacon.cc
r8706 r8858 79 79 XMLPortEventSink(QuestEffectBeacon, BaseObject, "execute", execute, xmlelement, mode); //TODO: Change BaseObject to MultiTrigger as soon as MultiTrigger is the base of all triggers. 80 80 81 COUT(4) << "New QuestEffectBeacon created." << std::endl;81 orxout(verbose, context::quests) << "New QuestEffectBeacon created." << endl; 82 82 } 83 83 … … 108 108 if(!(this->isActive())) // If the QuestEffectBeacon is inactive it cannot be executed. 109 109 { 110 COUT(4) << "The QuestEffectBeacon is inactive." << std::endl;110 orxout(verbose, context::quests) << "The QuestEffectBeacon is inactive." << endl; 111 111 return false; 112 112 } … … 128 128 if(player == NULL) 129 129 { 130 COUT(4) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << std::endl;131 return false; 132 } 133 134 COUT(4) << "QuestEffectBeacon executed on player: " << player << " ." << std::endl;130 orxout(verbose, context::quests) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl; 131 return false; 132 } 133 134 orxout(verbose, context::quests) << "QuestEffectBeacon executed on player: " << player << " ." << endl; 135 135 136 136 bool temp = QuestEffect::invokeEffects(player, this->effects_); // Invoke the QuestEffects on the PlayerInfo. … … 221 221 this->effects_.push_back(effect); 222 222 223 COUT(4) << "A QuestEffect was added to a QuestEffectBeacon." << std::endl;223 orxout(verbose, context::quests) << "A QuestEffect was added to a QuestEffectBeacon." << endl; 224 224 return true; 225 225 } -
code/trunk/src/modules/questsystem/QuestHint.cc
r7552 r8858 74 74 QuestManager::getInstance().registerHint(this); // Registers the QuestHint with the QuestManager. 75 75 76 COUT(4) << "New QuestHint {" << this->getId() << "} created." << std::endl;76 orxout(verbose, context::quests) << "New QuestHint {" << this->getId() << "} created." << endl; 77 77 } 78 78 … … 120 120 else 121 121 { 122 COUT(4) << "An already active questHint was trying to get activated." << std::endl;122 orxout(verbose, context::quests) << "An already active questHint was trying to get activated." << endl; 123 123 return false; 124 124 } 125 125 } 126 126 127 COUT(4) << "A hint of a non-active quest was trying to get activated." << std::endl;127 orxout(verbose, context::quests) << "A hint of a non-active quest was trying to get activated." << endl; 128 128 return false; 129 129 } -
code/trunk/src/modules/questsystem/QuestItem.cc
r8079 r8858 89 89 if(id == "") // Checks whether the id is a valid id. 90 90 { 91 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;91 orxout(internal_warning, context::quests) << "Invalid id. QuestItem id {" << id << "} could not be set." << endl; 92 92 return; 93 93 } -
code/trunk/src/modules/questsystem/QuestListener.cc
r7462 r8858 84 84 this->quest_->addListener(this); // Adds the QuestListener to the Quests list of listeners. 85 85 86 COUT(4) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << std::endl;86 orxout(verbose, context::quests) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << endl; 87 87 } 88 88 … … 146 146 else 147 147 { 148 COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;148 orxout(internal_warning, context::quests) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << endl; 149 149 this->mode_ = QuestListenerMode::All; 150 150 return false; -
code/trunk/src/modules/questsystem/QuestManager.cc
r8729 r8858 61 61 RegisterRootObject(QuestManager); 62 62 63 COUT(3) << "QuestManager created." << std::endl;63 orxout(internal_info, context::quests) << "QuestManager created." << endl; 64 64 } 65 65 … … 70 70 QuestManager::~QuestManager() 71 71 { 72 COUT(3) << "QuestManager destroyed." << std::endl;72 orxout(internal_info, context::quests) << "QuestManager destroyed." << endl; 73 73 } 74 74 … … 103 103 { 104 104 quest->setRegistered(); 105 COUT(4) << "Quest with questId {" << quest->getId() << "} successfully inserted." << std::endl;105 orxout(verbose, context::quests) << "Quest with questId {" << quest->getId() << "} successfully inserted." << endl; 106 106 return true; 107 107 } 108 108 else 109 109 { 110 COUT(2) << "Quest with the same id was already present." << std::endl;110 orxout(internal_warning, context::quests) << "Quest with the same id was already present." << endl; 111 111 return false; 112 112 } … … 141 141 { 142 142 hint->setRegistered(); 143 COUT(4) << "QuestHint with hintId {" << hint->getId() << "} successfully inserted." << std::endl;143 orxout(verbose, context::quests) << "QuestHint with hintId {" << hint->getId() << "} successfully inserted." << endl; 144 144 return true; 145 145 } 146 146 else 147 147 { 148 COUT(2) << "QuestHint with the same id was already present." << std::endl;148 orxout(internal_warning, context::quests) << "QuestHint with the same id was already present." << endl; 149 149 return false; 150 150 } … … 183 183 { 184 184 quest = NULL; 185 COUT(2) << "The quest with id {" << questId << "} is nowhere to be found." << std::endl;185 orxout(internal_warning, context::quests) << "The quest with id {" << questId << "} is nowhere to be found." << endl; 186 186 } 187 187 … … 212 212 { 213 213 hint = NULL; 214 COUT(2) << "The hint with id {" << hintId << "} is nowhere to be found." << std::endl;214 orxout(internal_warning, context::quests) << "The hint with id {" << hintId << "} is nowhere to be found." << endl; 215 215 } 216 216 … … 431 431 if(player == NULL) 432 432 { 433 COUT(1) << "Error: GUIOverlay with name '" << guiName << "' has no player." << std::endl;433 orxout(internal_error, context::quests) << "GUIOverlay with name '" << guiName << "' has no player." << endl; 434 434 return NULL; 435 435 } -
code/trunk/src/modules/questsystem/effects/AddQuest.cc
r7552 r8858 70 70 SUPER(AddQuest, XMLPort, xmlelement, mode); 71 71 72 COUT(4) << "New AddQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;72 orxout(verbose, context::quests) << "New AddQuest, with target Quest {" << this->getQuestId() << "}, created." << endl; 73 73 } 74 74 … … 85 85 assert(player); 86 86 87 COUT(5) << "AddQuest on player: " << player << " ." << std::endl;87 orxout(verbose_more, context::quests) << "AddQuest on player: " << player << " ." << endl; 88 88 89 89 try … … 95 95 catch(const orxonox::Exception& ex) 96 96 { 97 COUT(2) << ex.getFullDescription() << std::endl;97 orxout(internal_warning, context::quests) << ex.getFullDescription() << endl; 98 98 return false; 99 99 } 100 100 101 COUT(4) << "Quest {" << this->getQuestId() << "} successfully added to player: " << player << " ." << std::endl;101 orxout(verbose, context::quests) << "Quest {" << this->getQuestId() << "} successfully added to player: " << player << " ." << endl; 102 102 return true; 103 103 } -
code/trunk/src/modules/questsystem/effects/AddQuestHint.cc
r8079 r8858 73 73 XMLPortParam(AddQuestHint, "hintId", setHintId, getHintId, xmlelement, mode); 74 74 75 COUT(4) << "New AddQuestHint, with target QuestHint {" << this->getHintId() << "}, created." << std::endl;75 orxout(verbose, context::quests) << "New AddQuestHint, with target QuestHint {" << this->getHintId() << "}, created." << endl; 76 76 } 77 77 … … 88 88 if(id == "") 89 89 { 90 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;90 orxout(internal_warning, context::quests) << "Invalid id. QuestItem id {" << id << "} could not be set." << endl; 91 91 return false; 92 92 } … … 108 108 assert(player); 109 109 110 COUT(5) << "AddQuestHint on player: " << player << " ." << std::endl;110 orxout(verbose_more, context::quests) << "AddQuestHint on player: " << player << " ." << endl; 111 111 112 112 try … … 118 118 catch(const Exception& e) 119 119 { 120 COUT(2) << e.getFullDescription() << std::endl;120 orxout(internal_warning, context::quests) << e.getFullDescription() << endl; 121 121 return false; 122 122 } 123 123 124 COUT(4) << "QuestHint {" << this->getHintId() << "} successfully added to player: " << player << " ." << std::endl;124 orxout(verbose, context::quests) << "QuestHint {" << this->getHintId() << "} successfully added to player: " << player << " ." << endl; 125 125 return true; 126 126 -
code/trunk/src/modules/questsystem/effects/AddReward.cc
r8351 r8858 70 70 XMLPortObject(AddReward, Rewardable, "", addRewardable, getRewardables, xmlelement, mode); 71 71 72 COUT(4) << "New AddReward, with " << this->rewards_.size() << " Rewardables created." << std::endl;72 orxout(verbose, context::quests) << "New AddReward, with " << this->rewards_.size() << " Rewardables created." << endl; 73 73 } 74 74 … … 103 103 bool AddReward::invoke(PlayerInfo* player) 104 104 { 105 COUT(5) << "AddReward on player: " << player << " ." << std::endl;105 orxout(verbose_more, context::quests) << "AddReward on player: " << player << " ." << endl; 106 106 107 107 bool temp = true; … … 109 109 temp = temp && (*reward)->reward(player); 110 110 111 COUT(4) << "Rewardable successfully added to player." << player << " ." << std::endl;111 orxout(verbose, context::quests) << "Rewardable successfully added to player." << player << " ." << endl; 112 112 113 113 return temp; -
code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.cc
r8079 r8858 83 83 if(id == "") 84 84 { 85 COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;85 orxout(internal_warning, context::quests) << "Invalid id. QuestItem id {" << id << "} could not be set." << endl; 86 86 return false; 87 87 } -
code/trunk/src/modules/questsystem/effects/CompleteQuest.cc
r7552 r8858 70 70 SUPER(CompleteQuest, XMLPort, xmlelement, mode); 71 71 72 COUT(4) << "New CompleteQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;72 orxout(verbose, context::quests) << "New CompleteQuest, with target Quest {" << this->getQuestId() << "}, created." << endl; 73 73 } 74 74 … … 85 85 assert(player); 86 86 87 COUT(5) << "CompleteQuest on player: " << player << " ." << std::endl;87 orxout(verbose_more, context::quests) << "CompleteQuest on player: " << player << " ." << endl; 88 88 89 89 Quest* quest; … … 97 97 catch(const Exception& e) 98 98 { 99 COUT(2) << e.getFullDescription() << std::endl;99 orxout(internal_warning, context::quests) << e.getFullDescription() << endl; 100 100 return false; 101 101 } 102 102 103 COUT(4) << "Quest {" << quest->getId() << "} successfully completed by player: " << player << " ." << std::endl;103 orxout(verbose, context::quests) << "Quest {" << quest->getId() << "} successfully completed by player: " << player << " ." << endl; 104 104 return true; 105 105 } -
code/trunk/src/modules/questsystem/effects/FailQuest.cc
r7552 r8858 70 70 SUPER(FailQuest, XMLPort, xmlelement, mode); 71 71 72 COUT(4) << "New FailQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;72 orxout(verbose, context::quests) << "New FailQuest, with target Quest {" << this->getQuestId() << "}, created." << endl; 73 73 } 74 74 … … 85 85 assert(player); 86 86 87 COUT(4) << "FailQuest on player: " << player << " ." << std::endl;87 orxout(verbose, context::quests) << "FailQuest on player: " << player << " ." << endl; 88 88 89 89 Quest* quest; … … 96 96 catch(const Exception& e) 97 97 { 98 COUT(2) << e.getFullDescription() << std::endl;98 orxout(internal_warning, context::quests) << e.getFullDescription() << endl; 99 99 return false; 100 100 } 101 101 102 COUT(4) << "Quest {" << quest->getId() << "} failed by player: " << player << " ." << std::endl;102 orxout(verbose, context::quests) << "Quest {" << quest->getId() << "} failed by player: " << player << " ." << endl; 103 103 return true; 104 104 }
Note: See TracChangeset
for help on using the changeset viewer.