Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/quest/QuestEffect.cc @ 2145

Last change on this file since 2145 was 2105, checked in by rgrieder, 16 years ago

updated msvc files and precompiled headers.

File size: 2.0 KB
RevLine 
[1992]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Damian 'Mozork' Frick
24 *   Co-authors:
25 *      ...
26 *
27 */
28
[2105]29#include "OrxonoxStableHeaders.h"
30#include "QuestEffect.h"
31
[1992]32#include "core/CoreIncludes.h"
[2021]33
[1992]34namespace orxonox {
35
36    /**
37    @brief
38        Constructor. Creates a new QuestEffect.
39        Is not meant to be invoked directly, since this is only an interface.
40    */
[2092]41    QuestEffect::QuestEffect(BaseObject* creator) : BaseObject(creator)
[1992]42    {
43        RegisterObject(QuestEffect);
44    }
[2092]45
[1992]46    /**
47    @brief
48        Destructor.
49    */
50    QuestEffect::~QuestEffect()
51    {
[2092]52
[1992]53    }
[2092]54
[1992]55    /**
56    @brief
57        Static method. Invoke all effects of an effect list.
58    @param player
59        The player the effects are invoked on.
60    @param effects
61        A list of all the effects to be invoked.
[2068]62    @return
63        Returns false if there was an error, view console of log for further detail.
[1992]64    */
[2068]65    bool QuestEffect::invokeEffects(Player* player, std::list<QuestEffect*> & effects)
[1992]66    {
[2068]67        bool check = true;
[2092]68
[2021]69        for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
[2093]70        {
71            check = check && (*effect)->invoke(player);
72        }
73        return check;
[1992]74    }
75
76}
Note: See TracBrowser for help on using the repository browser.