orxonox::CompleteQuest Class Reference

Completes a Quest (with a specified id) for the player invoking the QuestEffect. More...

#include <src/orxonox/objects/quest/CompleteQuest.h>

Inheritance diagram for orxonox::CompleteQuest:

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

List of all members.

Public Member Functions

 CompleteQuest (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 CompleteQuest object through XML.
virtual ~CompleteQuest ()
 Destructor.


Detailed Description

Completes a Quest (with a specified id) for the player invoking the QuestEffect.

Creating a CompleteQuest through XML goes as follows:

<CompleteQuest 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 completed.

Author:
Damian 'Mozork' Frick

Constructor & Destructor Documentation

orxonox::CompleteQuest::CompleteQuest ( BaseObject creator  ) 

Constructor. Registers the object.

References RegisterObject.

orxonox::CompleteQuest::~CompleteQuest (  )  [virtual]

Destructor.


Member Function Documentation

bool orxonox::CompleteQuest::invoke ( PlayerInfo player  )  [virtual]

Invokes the QuestEffect.

Parameters:
player The player the QuestEffect is invoked on.
Returns:
Returns true if the QuestEffect was invoked successfully.

< You know, what we think of NULL-pointers...

Implements orxonox::ChangeQuestStatus.

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

void orxonox::CompleteQuest::XMLPort ( Element &  xmlelement,
XMLPort::Mode  mode 
) [virtual]

Method for creating a CompleteQuest 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:24 2009 for Orxonox by  doxygen 1.5.6