Orxonox: orxonox::AddQuest Class Reference

# orxonox::AddQuest Class Reference

Adds a Quest, resp. changes the quests status to active for the player invoking the Quest. More...

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

Inheritance diagram for orxonox::AddQuest:

List of all members.

## Public Member Functions

| AddQuest (BaseObject *creator)
| Constructor. Registers the object.
virtual bool | invoke (PlayerInfo *player)
| Invokes the QuestEffect.
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| Method for creating a AddQuest object through XML.
virtual | ~AddQuest ()
| Destructor.

## Detailed Description

Adds a Quest, resp. changes the quests status to active for the player invoking the Quest.

Creating a AddQuest through XML goes as follows:

<AddQuest questid="id"> //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the Quest that should be added.

Author:
  Damian 'Mozork' Frick

## Constructor & Destructor Documentation

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

Constructor. Registers the object.

References RegisterObject.

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

Destructor.

## Member Function Documentation

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

Invokes the QuestEffect.

Parameters:

  | player | The player the QuestEffect is invoked on.

Returns:
  Returns true if the QuestEffect was successfully invoked.

< Null-pointers are badass.

Implements orxonox::ChangeQuestStatus.

References COUT, orxonox::QuestManager::findQuest(), orxonox::Exception::getFullDescription(), orxonox::QuestManager::getInstance(), orxonox::ChangeQuestStatus::getQuestId(), and orxonox::Quest::start().

void orxonox::AddQuest::XMLPort | ( | Element & | xmlelement,
|  | XMLPort::Mode | mode |
| ) |  |  | `[virtual]`

Method for creating a AddQuest object through XML.

Reimplemented from orxonox::ChangeQuestStatus.

References COUT, orxonox::ChangeQuestStatus::getQuestId(), and SUPER.

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

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