#include <src/orxonox/objects/quest/AddQuest.h>
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. |
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.
orxonox::AddQuest::AddQuest | ( | BaseObject * | creator | ) |
orxonox::AddQuest::~AddQuest | ( | ) | [virtual] |
Destructor.
bool orxonox::AddQuest::invoke | ( | PlayerInfo * | player | ) | [virtual] |
Invokes the QuestEffect.
player | The player the QuestEffect is invoked on. |
< 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.