Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 27, 2008, 8:31:20 PM (16 years ago)
Author:
dafrick
Message:

Nearly compiles, some minor improvements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem/src/orxonox/objects/LocalQuest.cc

    r1996 r2021  
    3535    CreateFactory(LocalQuest);
    3636
     37    LocalQuest::LocalQuest() : Quest()
     38    {
     39       
     40    }
     41
    3742    /**
    3843    @brief
     
    4550        The description of the quest.
    4651    */
    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)
    4853    {
    4954        RegisterObject(LocalQuest);
     
    6772        Returns true if the quest can be started, false if not.
    6873    */
    69     bool LocalQuest::isStartable(const Player & player) const
     74    bool LocalQuest::isStartable(Player* player)
    7075    {
    7176        return this->isInactive(player);
     
    8085        Returns true if the quest can be failed, false if not.
    8186    */
    82     bool LocalQuest::isFailable(const Player & player) const
     87    bool LocalQuest::isFailable(Player* player)
    8388    {
    8489        return this->isActive(player);
     
    9398        Returns true if the quest can be completed, false if not.
    9499    */
    95     bool LocalQuest::isCompletable(const Player & player) const
     100    bool LocalQuest::isCompletable(Player* player)
    96101    {
    97102        return this->isActive(player);
     
    106111        Returns the status of the quest for the input player.
    107112    */
    108     virtual questStatus::Enum LocalQuest::getStatus(const Player & player) const
     113    questStatus::Enum LocalQuest::getStatus(const Player* player)
    109114    {
    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'.
    111116        if (it != this->playerStatus_.end())
    112117        {
     
    124129        The status.
    125130    */
    126     virtual void LocalQuest::setStatus(const Player & player, const questStatus::Enum & status)
     131    bool LocalQuest::setStatus(Player* player, const questStatus::Enum & status)
    127132    {
    128         this->playerStatus[&player] = status;
     133        this->playerStatus_[player] = status;
     134        return true;
    129135    }
    130136
Note: See TracChangeset for help on using the changeset viewer.