[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 | |
---|
| 29 | #include "core/CoreIncludes.h" |
---|
| 30 | #include "QuestEffect.h" |
---|
| 31 | |
---|
| 32 | namespace orxonox { |
---|
| 33 | |
---|
| 34 | CreateFactory(QuestEffect); |
---|
| 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() |
---|
| 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 | */ |
---|
[1996] | 63 | void QuestEffect::invokeEffects(Player & player, std::list<QuestEffect> & effects) |
---|
[1992] | 64 | { |
---|
| 65 | if ( effects == NULL ) |
---|
| 66 | { |
---|
| 67 | COUT(5) << "NULL-QuestEffect list encountered." << std::endl; |
---|
| 68 | return; |
---|
| 69 | } |
---|
| 70 | for ( std::list<QuestEffect>::iterator = effects.begin(); effect != effects.end(); ++effect ) |
---|
| 71 | { |
---|
| 72 | effect.invoke(player); |
---|
| 73 | } |
---|
| 74 | } |
---|
| 75 | |
---|
| 76 | } |
---|