Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 17, 2010, 10:50:43 PM (14 years ago)
Author:
dafrick
Message:

Resolving some TODOs and doing some additional cleanup. Almost done now…

File:
1 edited

Legend:

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

    r7456 r7552  
    135135    @return
    136136        Returns true if the quest can be started, false if not.
    137     @throws
    138         Throws an exception if either isInactive() of isActive() throws one.
    139137    */
    140138    bool GlobalQuest::isStartable(const PlayerInfo* player) const
     
    153151    @return
    154152        Returns true if the Quest can be failed, false if not.
    155     @throws
    156         Throws an Exception if isActive() throws one.
    157153    */
    158154    bool GlobalQuest::isFailable(const PlayerInfo* player) const
     
    169165    @return
    170166        Returns true if the Quest can be completed, false if not.
    171     @throws
    172         Throws an Exception if isActive() throws one.
    173167    */
    174168    bool GlobalQuest::isCompletable(const PlayerInfo* player) const
     
    182176    @param player
    183177        The player.
    184     @throws
    185         Throws an Exception if player is NULL.
    186178    */
    187179    QuestStatus::Value GlobalQuest::getStatus(const PlayerInfo* player) const
    188180    {
    189         //TODO: Replace with assert.
    190         if(player == NULL) // We don't want NULL-Pointers!
    191             ThrowException(Argument, "The input PlayerInfo* is NULL.");
     181        assert(player);
    192182
    193183        // Find the player.
     
    212202    bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
    213203    {
    214         //TODO: Replace with assert.
    215         if(player == NULL) // We don't want NULL-Pointers!
    216             return false;
     204        assert(player);
    217205
    218206        // Find the player.
     
    235223    bool GlobalQuest::addRewardEffect(QuestEffect* effect)
    236224    {
    237         //TODO: Replace with assert?
    238         if(effect == NULL) // We don't want NULL-Pointers!
    239         {
    240             COUT(2) << "The reward effect to be added to quest {" << this->getId() << "} was NULL." << std::endl;
    241             return false;
    242         }
     225        assert(effect);
    243226
    244227        this->rewards_.push_back(effect); // Add the QuestEffect to the list.
Note: See TracChangeset for help on using the changeset viewer.