- Timestamp:
- Oct 27, 2008, 8:31:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem/src/orxonox/objects/LocalQuest.cc
r1996 r2021 35 35 CreateFactory(LocalQuest); 36 36 37 LocalQuest::LocalQuest() : Quest() 38 { 39 40 } 41 37 42 /** 38 43 @brief … … 45 50 The description of the quest. 46 51 */ 47 LocalQuest::LocalQuest(std::string id, std::string title = "", std::string description = "") : Quest(id, title, description)52 LocalQuest::LocalQuest(std::string id, std::string title, std::string description) : Quest(id, title, description) 48 53 { 49 54 RegisterObject(LocalQuest); … … 67 72 Returns true if the quest can be started, false if not. 68 73 */ 69 bool LocalQuest::isStartable( const Player & player) const74 bool LocalQuest::isStartable(Player* player) 70 75 { 71 76 return this->isInactive(player); … … 80 85 Returns true if the quest can be failed, false if not. 81 86 */ 82 bool LocalQuest::isFailable( const Player & player) const87 bool LocalQuest::isFailable(Player* player) 83 88 { 84 89 return this->isActive(player); … … 93 98 Returns true if the quest can be completed, false if not. 94 99 */ 95 bool LocalQuest::isCompletable( const Player & player) const100 bool LocalQuest::isCompletable(Player* player) 96 101 { 97 102 return this->isActive(player); … … 106 111 Returns the status of the quest for the input player. 107 112 */ 108 virtual questStatus::Enum LocalQuest::getStatus(const Player & player) const113 questStatus::Enum LocalQuest::getStatus(const Player* player) 109 114 { 110 std::map<Player*, questStatus::Enum>:: iterator it = this->playerStatus_.find(&player);115 std::map<Player*, questStatus::Enum>::const_iterator it = this->playerStatus_.find((Player*)(void*)player); //Thx. to x3n for the (Player*)(void*) 'hack'. 111 116 if (it != this->playerStatus_.end()) 112 117 { … … 124 129 The status. 125 130 */ 126 virtual void LocalQuest::setStatus(const Player &player, const questStatus::Enum & status)131 bool LocalQuest::setStatus(Player* player, const questStatus::Enum & status) 127 132 { 128 this->playerStatus[&player] = status; 133 this->playerStatus_[player] = status; 134 return true; 129 135 } 130 136
Note: See TracChangeset
for help on using the changeset viewer.