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:

orxonox::ChangeQuestStatus orxonox::QuestEffect orxonox::BaseObject orxonox::OrxonoxClass

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:

Generated on Tue Jul 28 16:22:20 2009 for Orxonox by  doxygen 1.5.6