- Timestamp:
- Oct 27, 2008, 8:31:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/QuestHint.cc
r1996 r2021 28 28 29 29 #include "core/CoreIncludes.h" 30 31 #include "Quest.h" 30 32 #include "QuestHint.h" 31 33 … … 33 35 34 36 CreateFactory(QuestHint); 37 38 QuestHint::QuestHint() : QuestItem() 39 { 40 41 } 35 42 36 43 /** … … 44 51 The description of the hint, resp. the hint itself. 45 52 */ 46 QuestHint::QuestHint(std::string id, std::string title = "", std::string description = "") : QuestItem(id, title, description)53 QuestHint::QuestHint(std::string id, std::string title, std::string description) : QuestItem(id, title, description) 47 54 { 48 55 RegisterObject(QuestHint); … … 66 73 Returns 67 74 */ 68 bool QuestHint::isActive( const Player & player) const75 bool QuestHint::isActive(Player* player) 69 76 { 70 std::map<Player*, questHintStatus::Enum>::iterator it = this->playerStatus_.find( &player);77 std::map<Player*, questHintStatus::Enum>::iterator it = this->playerStatus_.find(player); 71 78 if (it != this->playerStatus_.end()) 72 79 { … … 76 83 } 77 84 78 bool QuestHint::activate(const Player & player) 85 /** 86 @brief 87 @param player 88 @return 89 */ 90 bool QuestHint::activate(Player* player) 79 91 { 80 if(this->quest_->isActive(player) && ! this->isActive())92 if(this->quest_->isActive(player) && !(this->isActive(player))) 81 93 { 82 this->playerStatus_[ &player] = questHintStatus::active;94 this->playerStatus_[player] = questHintStatus::active; 83 95 return true; 84 96 } … … 87 99 } 88 100 101 /** 102 @brief 103 @param quest 104 @return 105 */ 89 106 void QuestHint::setQuest(Quest* quest) 90 107 {
Note: See TracChangeset
for help on using the changeset viewer.