Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

updated msvc files and precompiled headers.

File size: 2.0 KB
Line 
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
29#include "OrxonoxStableHeaders.h"
30#include "QuestEffect.h"
31
32#include "core/CoreIncludes.h"
33
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    */
41    QuestEffect::QuestEffect(BaseObject* creator) : BaseObject(creator)
42    {
43        RegisterObject(QuestEffect);
44    }
45
46    /**
47    @brief
48        Destructor.
49    */
50    QuestEffect::~QuestEffect()
51    {
52
53    }
54
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.
62    @return
63        Returns false if there was an error, view console of log for further detail.
64    */
65    bool QuestEffect::invokeEffects(Player* player, std::list<QuestEffect*> & effects)
66    {
67        bool check = true;
68
69        for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
70        {
71            check = check && (*effect)->invoke(player);
72        }
73        return check;
74    }
75
76}
Note: See TracBrowser for help on using the repository browser.