CEL

Public API Reference

iQuestManager Struct Reference

This is the quest manager. More...

#include <tools/questmanager.h>

Inheritance diagram for iQuestManager:

List of all members.

Public Member Functions

virtual
iChangePropertyQuestRewardFactory
AddChangePropertyReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *prop_par)=0
 Convenience method to add a 'changeproperty' reward factory to a response factory.
virtual iQuestRewardFactoryAddCsSequenceReward (iQuestTriggerResponseFactory *response, const char *sequence_par, const char *delay_par)=0
 Convenience method to add an 'cssequence' reward factory to a response factory.
virtual iQuestRewardFactoryAddDebugPrintReward (iQuestTriggerResponseFactory *response, const char *msg_par)=0
 Convenience method to add a 'debugprint' reward factory to a response factory.
virtual iQuestRewardFactoryAddInventoryReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *child_entity_par)=0
 Convenience method to add an 'inventory' reward factory to a response factory.
virtual iQuestRewardFactoryAddNewStateReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *state_par)=0
 Convenience method to add a 'newstate' reward factory to a response factory.
virtual iQuestRewardFactoryAddSequenceFinishReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sequence_par)=0
 Convenience method to add an 'sequencefinish' reward factory to a response factory.
virtual iQuestRewardFactoryAddSequenceReward (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sequence_par, const char *delay_par)=0
 Convenience method to add an 'sequence' reward factory to a response factory.
virtual iQuestFactoryCreateQuestFactory (const char *name)=0
 Create an empty quest factory.
virtual void FillParameterBlock (iCelParameterBlock *params, celVariableParameterBlock *act_params, const csArray< celParSpec > &parameters, const csRefArray< iQuestParameter > &quest_parameters)=0
 Fill in the dynamic parameters in a parameter block.
virtual csPtr< iQuestParameterGetParameter (const celQuestParams &params, const char *param)=0
 Get a parameter that can be evalulated later on an as-needed basis.
virtual csPtr
< celVariableParameterBlock
GetParameterBlock (const celQuestParams &params, const csArray< celParSpec > &parameters, csRefArray< iQuestParameter > &quest_parameters)=0
 This is a convenience function to get a quest parameter block during creation of rewards, triggers, and sequence operations.
virtual iQuestFactoryGetQuestFactory (const char *name)=0
 Get a quest factory by name.
virtual iQuestRewardTypeGetRewardType (const char *name)=0
 Get a reward type from the quest manager.
virtual iQuestSeqOpTypeGetSeqOpType (const char *name)=0
 Get a seqop type from the quest manager.
virtual iQuestTriggerTypeGetTriggerType (const char *name)=0
 Get a trigger type from the quest manager.
virtual bool Load (iDocumentNode *node)=0
 Load a bunch of quest factories.
virtual bool RegisterRewardType (iQuestRewardType *trigger)=0
 Register a quest reward type.
virtual bool RegisterSeqOpType (iQuestSeqOpType *seqop)=0
 Register a seqop reward type.
virtual bool RegisterTriggerType (iQuestTriggerType *trigger)=0
 Register a quest trigger type.
virtual void RemoveQuestFactories ()=0
 Delete all quest factories.
virtual void RemoveQuestFactory (const char *name)=0
 Delete a quest factory by name.
virtual const char * ResolveParameter (const celQuestParams &params, const char *param)=0
 This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations.
virtual iQuestTriggerFactorySetEnterSectorTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sector_par)=0
 Convenience method to set an 'entersector' trigger factory to a response factory.
virtual iQuestTriggerFactorySetMeshEnterSectorTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sector_par)=0
 Convenience method to set a 'meshentersector' trigger factory to a response factory.
virtual iQuestTriggerFactorySetOperationTrigger (iQuestTriggerResponseFactory *response, const char *operation_par, csRefArray< iQuestTriggerFactory > &trigger_factories)=0
 Convenience method to set a 'operation' trigger factory to a response factory.
virtual iQuestTriggerFactorySetPropertyChangeTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *prop_par, const char *value_par)=0
 Convenience method to set a 'propertychange' trigger factory to a response factory.
virtual iQuestTriggerFactorySetSequenceFinishTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *sequence_par)=0
 Convenience method to set a 'sequencefinish' trigger factory to a response factory.
virtual iQuestTriggerFactorySetTimeoutTrigger (iQuestTriggerResponseFactory *response, const char *timeout_par)=0
 Convenience method to set a 'timeout' trigger factory to a response factory.
virtual iQuestTriggerFactorySetTriggerTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, bool do_leave=false)=0
 Convenience method to set a 'trigger' trigger factory to a response factory.
virtual iQuestTriggerFactorySetWatchTrigger (iQuestTriggerResponseFactory *response, const char *entity_par, const char *target_entity_par, const char *checktime_par, const char *radius_par)=0
 Convenience method to set a 'watch' trigger factory to a response factory.

Detailed Description

This is the quest manager.

This manager can be used to handle quests. A quest is basically a state machine which can advance from state to state when a trigger activates. It can also hand out 'rewards'.

Definition at line 687 of file questmanager.h.


Member Function Documentation

virtual iChangePropertyQuestRewardFactory* iQuestManager::AddChangePropertyReward ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  prop_par 
) [pure virtual]

Convenience method to add a 'changeproperty' reward factory to a response factory.

You need to specify exactly which value should be modified after calling this.

virtual iQuestRewardFactory* iQuestManager::AddCsSequenceReward ( iQuestTriggerResponseFactory response,
const char *  sequence_par,
const char *  delay_par 
) [pure virtual]

Convenience method to add an 'cssequence' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddDebugPrintReward ( iQuestTriggerResponseFactory response,
const char *  msg_par 
) [pure virtual]

Convenience method to add a 'debugprint' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddInventoryReward ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  child_entity_par 
) [pure virtual]

Convenience method to add an 'inventory' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddNewStateReward ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  state_par 
) [pure virtual]

Convenience method to add a 'newstate' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddSequenceFinishReward ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  sequence_par 
) [pure virtual]

Convenience method to add an 'sequencefinish' reward factory to a response factory.

virtual iQuestRewardFactory* iQuestManager::AddSequenceReward ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  sequence_par,
const char *  delay_par 
) [pure virtual]

Convenience method to add an 'sequence' reward factory to a response factory.

virtual iQuestFactory* iQuestManager::CreateQuestFactory ( const char *  name  )  [pure virtual]

Create an empty quest factory.

Returns 0 on failure (quest factory with that name already exists).

virtual void iQuestManager::FillParameterBlock ( iCelParameterBlock params,
celVariableParameterBlock act_params,
const csArray< celParSpec > &  parameters,
const csRefArray< iQuestParameter > &  quest_parameters 
) [pure virtual]

Fill in the dynamic parameters in a parameter block.

Parameters:
params is the parameter block given to the reward.
msg_params is the resolved parameter block as returned by GetParameterBlock().
parameters is the parameter specifications and unparsed values.
quest_parameters is an array with quest parameters.
virtual csPtr<iQuestParameter> iQuestManager::GetParameter ( const celQuestParams params,
const char *  param 
) [pure virtual]

Get a parameter that can be evalulated later on an as-needed basis.

Returns 0 for an illegal parameter (error reporting has been done).

virtual csPtr<celVariableParameterBlock> iQuestManager::GetParameterBlock ( const celQuestParams params,
const csArray< celParSpec > &  parameters,
csRefArray< iQuestParameter > &  quest_parameters 
) [pure virtual]

This is a convenience function to get a quest parameter block during creation of rewards, triggers, and sequence operations.

This routine knows how to recognize parameter usage (starting with '$' or '@') and will in that case try to resolve the parameter by finding it in 'params'.

Parameters:
params is the quest parameters.
paramspec is the parameter specifications and unparsed values.
quest_parameters is an array that should have the same length as the 'paramspec' array. It will be filled with the parameters.
virtual iQuestFactory* iQuestManager::GetQuestFactory ( const char *  name  )  [pure virtual]

Get a quest factory by name.

virtual iQuestRewardType* iQuestManager::GetRewardType ( const char *  name  )  [pure virtual]

Get a reward type from the quest manager.

Returns 0 if no such reward type exists.

virtual iQuestSeqOpType* iQuestManager::GetSeqOpType ( const char *  name  )  [pure virtual]

Get a seqop type from the quest manager.

Returns 0 if no such seqop type exists.

virtual iQuestTriggerType* iQuestManager::GetTriggerType ( const char *  name  )  [pure virtual]

Get a trigger type from the quest manager.

Returns 0 if no such trigger type exists.

virtual bool iQuestManager::Load ( iDocumentNode node  )  [pure virtual]

Load a bunch of quest factories.

Parameters:
node is a node containing <quest> children.
Returns:
false on error (reporter is used to report).
virtual bool iQuestManager::RegisterRewardType ( iQuestRewardType trigger  )  [pure virtual]

Register a quest reward type.

Quest rewards can be used by quests to give out some kind of reward to the game. Returns false on failure (reward type with that name already exists).

The following predefined reward types are automatically registered in the quest manager:

virtual bool iQuestManager::RegisterSeqOpType ( iQuestSeqOpType seqop  )  [pure virtual]

Register a seqop reward type.

Seqop rewards can be used by quest sequences to define operations in the sequence. Returns false on failure (swqop type with that name already exists).

The following predefined sequence operation types are automatically registered in the quest manager:

virtual bool iQuestManager::RegisterTriggerType ( iQuestTriggerType trigger  )  [pure virtual]

Register a quest trigger type.

Quest triggers can be used by quests to decide when to go to another state or when to activate a reward. Returns false on failure (trigger type with that name already exists).

The following predefined trigger types are automatically registered in the quest manager:

virtual void iQuestManager::RemoveQuestFactories (  )  [pure virtual]

Delete all quest factories.

virtual void iQuestManager::RemoveQuestFactory ( const char *  name  )  [pure virtual]

Delete a quest factory by name.

virtual const char* iQuestManager::ResolveParameter ( const celQuestParams params,
const char *  param 
) [pure virtual]

This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations.

This routine knows how to recognize parameter usage (starting with '$') and will in that case try to resolve the parameter by finding it in 'params'. Otherwise it will just return the unmodified string. This version doesn't support dynamic parameters.

virtual iQuestTriggerFactory* iQuestManager::SetEnterSectorTrigger ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  sector_par 
) [pure virtual]

Convenience method to set an 'entersector' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetMeshEnterSectorTrigger ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  sector_par 
) [pure virtual]

Convenience method to set a 'meshentersector' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetOperationTrigger ( iQuestTriggerResponseFactory response,
const char *  operation_par,
csRefArray< iQuestTriggerFactory > &  trigger_factories 
) [pure virtual]

Convenience method to set a 'operation' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetPropertyChangeTrigger ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  prop_par,
const char *  value_par 
) [pure virtual]

Convenience method to set a 'propertychange' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetSequenceFinishTrigger ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  sequence_par 
) [pure virtual]

Convenience method to set a 'sequencefinish' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetTimeoutTrigger ( iQuestTriggerResponseFactory response,
const char *  timeout_par 
) [pure virtual]

Convenience method to set a 'timeout' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetTriggerTrigger ( iQuestTriggerResponseFactory response,
const char *  entity_par,
bool  do_leave = false 
) [pure virtual]

Convenience method to set a 'trigger' trigger factory to a response factory.

virtual iQuestTriggerFactory* iQuestManager::SetWatchTrigger ( iQuestTriggerResponseFactory response,
const char *  entity_par,
const char *  target_entity_par,
const char *  checktime_par,
const char *  radius_par 
) [pure virtual]

Convenience method to set a 'watch' trigger factory to a response factory.


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

Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1