Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 15, 2010, 7:29:16 PM (14 years ago)
Author:
dafrick
Message:

Reviewing documentation fo Questsystem, moving documentation fully into doxygen.
Added some files to modules they belong to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/questsystem/LocalQuest.cc

    r7163 r7456  
    2828
    2929/**
    30     @file
     30    @file LocalQuest.cc
    3131    @brief Implementation of the LocalQuest class.
    3232*/
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
     38
    3839#include "QuestEffect.h"
    3940
     
    8283    bool LocalQuest::fail(PlayerInfo* player)
    8384    {
    84         if(!this->isFailable(player)) //!< Checks whether the quest can be failed.
     85        if(!this->isFailable(player)) // Checks whether the quest can be failed.
    8586        {
    8687            COUT(4) << "A non-failable quest was trying to be failed." << std::endl;
     
    9091        Quest::fail(player);
    9192
    92         QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects.
     93        QuestEffect::invokeEffects(player, this->getFailEffectList()); // Invoke the failEffects.
    9394        return true;
    9495    }
     
    105106    bool LocalQuest::complete(PlayerInfo* player)
    106107    {
    107         if(!this->isCompletable(player)) //!< Checks whether the Quest can be completed.
     108        if(!this->isCompletable(player)) // Checks whether the Quest can be completed.
    108109        {
    109110            COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
     
    113114        Quest::complete(player);
    114115
    115         QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects.
     116        QuestEffect::invokeEffects(player, this->getCompleteEffectList()); // Invoke the complete QuestEffects.
    116117        return true;
    117118    }
     
    130131    {
    131132        if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
    132         {
    133             return false;
    134         }
     133            return false;
     134
    135135        return this->isInactive(player);
    136136    }
     
    178178    QuestStatus::Value LocalQuest::getStatus(const PlayerInfo* player) const
    179179    {
    180         if(player == NULL) //!< No player has no defined status.
    181         {
     180        //TODO: Replace with assert.
     181        if(player == NULL) // No player has no defined status.
    182182            ThrowException(Argument, "The input PlayerInfo* is NULL.");
    183         }
    184183
    185184        std::map<const PlayerInfo*, QuestStatus::Value>::const_iterator it = this->playerStatus_.find(player);
    186         if (it != this->playerStatus_.end()) //!< If there is a player in the map.
    187         {
     185        if (it != this->playerStatus_.end()) // If there is a player in the map.
    188186            return it->second;
    189         }
    190 
    191         return QuestStatus::Inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
     187
     188        return QuestStatus::Inactive; // If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
    192189    }
    193190
     
    205202    bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
    206203    {
    207         if(player == NULL) //!< We can't set a status for no player.
    208         {
    209             return false;
    210         }
     204        //TODO: Replace with assert.
     205        if(player == NULL) // We can't set a status for no player.
     206            return false;
    211207
    212208        this->playerStatus_[player] = status;
Note: See TracChangeset for help on using the changeset viewer.