Orxonox: orxonox::QuestEffect Class Reference

# orxonox::QuestEffect Class Reference

Handles QuestEffects for Quests. QuestEffects are the only way for Quests to have any sideeffects in the game world. They are also the only way for a player to gain, complete or fail Quests. More...

`#include <src/orxonox/objects/quest/QuestEffect.h>`

Inheritance diagram for orxonox::QuestEffect:

List of all members.

## Public Member Functions

virtual bool | invoke (PlayerInfo *player)=0
| Invokes the QuestEffect.
| QuestEffect (BaseObject *creator)
| Constructor. Creates a new QuestEffect. Is not meant to be invoked directly, since this is only an interface.
virtual | ~QuestEffect ()
| Destructor.

## Static Public Member Functions

static bool | invokeEffects (PlayerInfo *player, std::list< QuestEffect * > &effects)
| Invokes all QuestEffects in the list.

## Detailed Description

Handles QuestEffects for Quests. QuestEffects are the only way for Quests to have any sideeffects in the game world. They are also the only way for a player to gain, complete or fail Quests.

Author:
  Damian 'Mozork' Frick

## Constructor & Destructor Documentation

orxonox::QuestEffect::QuestEffect | ( | BaseObject * | creator | ) |

Constructor. Creates a new QuestEffect. Is not meant to be invoked directly, since this is only an interface.

References RegisterObject.

orxonox::QuestEffect::~QuestEffect | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual bool orxonox::QuestEffect::invoke | ( | PlayerInfo * | player | ) | `[pure virtual]`

Invokes the QuestEffect.

Implemented in orxonox::AddQuest, orxonox::AddQuestHint, orxonox::AddReward, orxonox::ChangeQuestStatus, orxonox::CompleteQuest, and orxonox::FailQuest.

bool orxonox::QuestEffect::invokeEffects | ( | PlayerInfo * | player,
|  | std::list< QuestEffect * > & | effects |
| ) |  |  | `[static]`

Invokes all QuestEffects in the list.

Static method. Invoke all QuestEffects in an QuestEffect-list on a given player.

Parameters:

  | player | The player the QuestEffects are invoked on.
  | effects | A list of all the QuestEffects to be invoked.

Returns:
  Returns false if there was an error, view console of log for further detail.

References COUT.

Referenced by orxonox::LocalQuest::complete(), orxonox::GlobalQuest::complete(), orxonox::QuestEffectBeacon::execute(), orxonox::LocalQuest::fail(), and orxonox::GlobalQuest::fail().

The documentation for this class was generated from the following files:

- src/orxonox/objects/quest/QuestEffect.h
- src/orxonox/objects/quest/QuestEffect.cc