Changeset 2209 for code/branches/questsystem2/src/orxonox/objects
- Timestamp:
- Nov 14, 2008, 2:55:55 PM (16 years ago)
- Location:
- code/branches/questsystem2/src/orxonox/objects
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/AddQuest.cc
r2205 r2209 92 92 } 93 93 94 COUT(3) << "AddQuest on player: " << player << " ." << std::endl; 95 94 96 try 95 97 { … … 106 108 } 107 109 108 110 COUT(3) << "Quest {" << this->getQuestId() << "} successfully added to player." << std::endl; 109 111 return true; 110 112 } -
code/branches/questsystem2/src/orxonox/objects/quest/CompleteQuest.cc
r2205 r2209 89 89 } 90 90 91 COUT(3) << "CompleteQuest on player: " << player << " ." << std::endl; 92 93 Quest* quest; 94 91 95 try 92 96 { 93 Quest*quest = QuestManager::findQuest(this->getQuestId());97 quest = QuestManager::findQuest(this->getQuestId()); 94 98 if(!quest->complete(player)) 95 99 { … … 103 107 } 104 108 109 COUT(3) << "Quest {" << quest->getId() << "} successfully completed by player: " << player << " ." << std::endl; 105 110 return true; 106 111 } -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc
r2208 r2209 71 71 } 72 72 73 bool QuestEffectBeacon::execute(bool b, ControllableEntity* entity) 74 { 75 if(!b || !(this->isActive())) 73 bool QuestEffectBeacon::execute(bool b, PlayerTrigger* trigger) 74 { 75 if(!b) 76 { 77 COUT(2) << "b is false." << std::endl; 78 } 79 if(!(this->isActive())) 76 80 { 77 81 COUT(3) << "The QuestEffectBeacon is inactive." << std::endl; 78 82 return false; 79 83 } 84 85 ControllableEntity* entity = trigger->getTriggeringPlayer(); 86 80 87 if(entity == NULL) 81 88 { … … 91 98 return false; 92 99 } 93 100 101 COUT(3) << "QuestEffectBeacon executed on player: " << player << " ." << std::endl; 102 94 103 bool check = QuestEffect::invokeEffects(player, this->effects_); 95 104 if(check) -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.h
r2208 r2209 65 65 virtual void processEvent(Event& event); 66 66 67 bool execute(bool b, ControllableEntity* player); //!< Executes the QuestEffects of the QuestEffectBeacon.67 bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon. 68 68 69 69 bool isActive(void); //!< Test whether the QuestEffectBeacon is active. -
code/branches/questsystem2/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
r2206 r2209 141 141 if (Trigger::isTriggered(mode)) 142 142 { 143 COUT(3) << "Triggers" << std::endl;144 143 return checkDistance(); 145 144 }
Note: See TracChangeset
for help on using the changeset viewer.