Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2008, 11:39:44 PM (17 years ago)
Author:
dafrick
Message:
  • Changed questStatus to mode in QuestListener.
  • Added new mode 'all' in QuestListener
  • Documented QuestListener
  • Cleaned up some code, replaced tabs with spaces, a.s.o.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem3/src/orxonox/objects/quest/GlobalQuest.cc

    r2328 r2352  
    2929/**
    3030    @file GlobalQuest.cc
    31     @brief
    32     Implementation of the GlobalQuest class.
     31    @brief Implementation of the GlobalQuest class.
    3332*/
    3433
     
    9695       
    9796        Quest::fail(player);
    98        
    99         //! Iterate through all players possessing this Quest.
    100         for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
    101         {
    102             QuestEffect::invokeEffects(*it, this->getFailEffectList());
    103         }
    104 
    105         return true;
     97   
     98    //! Iterate through all players possessing this Quest.
     99    for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
     100    {
     101        QuestEffect::invokeEffects(*it, this->getFailEffectList());
     102    }
     103
     104    return true;
    106105    }
    107106
     
    125124       
    126125        //! Iterate through all players possessing the Quest.
    127         for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
    128         {
    129             QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
    130         }
    131        
    132         Quest::complete(player);
    133        
    134         QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest.
    135         return true;
     126        for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
     127        {
     128            QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
     129        }
     130   
     131        Quest::complete(player);
     132   
     133        QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest.
     134        return true;
    136135    }
    137136
     
    208207        }
    209208
    210     return questStatus::inactive;
     209        return questStatus::inactive;
    211210    }
    212211
Note: See TracChangeset for help on using the changeset viewer.