- Timestamp:
- Dec 23, 2008, 10:40:38 PM (16 years ago)
- Location:
- code/branches/bugger
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bugger
- Property svn:mergeinfo changed
/code/branches/questsystem2 (added) merged: 2109,2146,2159,2191,2193-2196,2205-2206,2208-2209,2221,2226,2228,2251,2258
- Property svn:mergeinfo changed
-
code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.cc
- Property svn:mergeinfo changed
/code/branches/questsystem2/src/orxonox/objects/quest/CompleteQuest.cc (added) merged: 2146,2159,2191,2205,2209,2226,2251 /code/trunk/src/orxonox/objects/quest/CompleteQuest.cc merged: 1925-2089
r2105 r2530 26 26 * 27 27 */ 28 29 /** 30 @file CompleteQuest.cc 31 @brief 32 Implementation of the CompleteQuest class. 33 */ 28 34 29 35 #include "OrxonoxStableHeaders.h" … … 33 39 #include "util/Exception.h" 34 40 41 #include "orxonox/objects/infos/PlayerInfo.h" 35 42 #include "QuestManager.h" 36 43 #include "Quest.h" … … 40 47 CreateFactory(CompleteQuest); 41 48 49 /** 50 @brief 51 Constructor. Registers the object. 52 */ 42 53 CompleteQuest::CompleteQuest(BaseObject* creator) : ChangeQuestStatus(creator) 43 54 { … … 53 64 } 54 65 66 /** 67 @brief 68 Method for creating a CompleteQuest object through XML. 69 */ 55 70 void CompleteQuest::XMLPort(Element& xmlelement, XMLPort::Mode mode) 56 71 { 57 72 SUPER(CompleteQuest, XMLPort, xmlelement, mode); 73 74 COUT(3) << "New CompleteQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl; 58 75 } 59 76 60 77 /** 61 78 @brief 62 Invokes the effect.79 Invokes the QuestEffect. 63 80 @param player 64 The player the effect is invoked on.81 The player the QuestEffect is invoked on. 65 82 @return 66 Returns true if the effect was invoked successfully.83 Returns true if the QuestEffect was invoked successfully. 67 84 */ 68 bool CompleteQuest::invoke(Player * player)85 bool CompleteQuest::invoke(PlayerInfo* player) 69 86 { 70 if(player == NULL) 87 if(player == NULL) //!< You know, what we think of NULL-pointers... 71 88 { 72 89 COUT(2) << "Input player is NULL." << std::endl; … … 74 91 } 75 92 93 COUT(3) << "CompleteQuest on player: " << player << " ." << std::endl; 94 95 Quest* quest; 96 76 97 try 77 98 { 78 Quest*quest = QuestManager::findQuest(this->getQuestId());79 if( !quest->complete(player))99 quest = QuestManager::findQuest(this->getQuestId()); 100 if(quest == NULL || !quest->complete(player)) 80 101 { 81 102 return false; … … 88 109 } 89 110 111 COUT(3) << "Quest {" << quest->getId() << "} successfully completed by player: " << player << " ." << std::endl; 90 112 return true; 91 113 } - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.