## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iQuest Struct Reference

A quest instance. More...

`#include <tools/questmanager.h>`

List of all members.

## Public Member Functions

virtual iQuestSequence * | FindSequence (const char *name)=0
| Find a sequence.
virtual const char * | GetCurrentState () const =0
| Get current state name of this quest.
virtual bool | LoadState (const char *state, iCelDataBuffer *databuf)=0
| This is a special version of SwitchState() that needs to be used in case you are loading a quest from a CEL databuffer (persistence).
virtual void | SaveState (iCelDataBuffer *databuf)=0
| Save the state to the persistence layer.
virtual bool | SwitchState (const char *state)=0
| Switch this quest to some specific state.

## Detailed Description

A quest instance.

This is created (by the quest manager) from a quest factory using the trigger and reward factories.

Definition at line 424 of file questmanager.h.

## Member Function Documentation

virtual iQuestSequence* iQuest::FindSequence | ( | const char * | name | ) | `[pure virtual]`

| Find a sequence.

virtual const char* iQuest::GetCurrentState | ( |  | ) | const`[pure virtual]`

| Get current state name of this quest.

virtual bool iQuest::LoadState | ( | const char * | state,
|  | iCelDataBuffer * | databuf
| ) | `[pure virtual]`

This is a special version of SwitchState() that needs to be used in case you are loading a quest from a CEL databuffer (persistence).

Returns:
  false on failure (data in buffer doesn't match what we want).

virtual void iQuest::SaveState | ( | iCelDataBuffer * | databuf | ) | `[pure virtual]`

| Save the state to the persistence layer. To restore later use LoadState().

virtual bool iQuest::SwitchState | ( | const char * | state | ) | `[pure virtual]`

| Switch this quest to some specific state. Returns false if state doesn't exist (nothing happens then).

The documentation for this struct was generated from the following file:

- tools/questmanager.h