ObjectiveDefinition

ObjectiveDefinition Class

The ObjectiveDefinition stores the data that is used to create quest objective instances for users.

Syntax

[Sansar.Script.Interface]
public class ObjectiveDefinition : Sansar.Script.InstanceInterface

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Properties

[read-only]
Description string . The objective description.
[read-only]
InitialState ObjectiveState . The initial state that this objective will have when a user starts the quest
[read-only]
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)
[read-only]
Ready bool . If the QuestDefinition data is ready.
[read-only]
RequiredCount int . The required count to complete the objective.
[read-only]
Title string . The objective title.

Public Methods

  GetObjective (Sansar.Script.SessionId)
Get the state of this objective for a particular user.
  GetObjective (AgentPrivate)
Get the state of this objective for a particular user.
  GetObjective (Sansar.Script.SessionId, Action<ObjectiveDefinition.GetObjectiveData>)
Get the state of this objective for a particular user.
  GetObjective (AgentPrivate, Action<ObjectiveDefinition.GetObjectiveData>)
Get the state of this objective for a particular user.
override
ToString () : string
A string representation of this object.
  Update ()
Update the ObjectiveDefinition data.
  Update (Action<Sansar.Script.OperationCompleteEvent>)
Update the ObjectiveDefinition data.

Member Details

Description Property

The objective description.

Syntax

[get: Sansar.Script.Interface]
public string Description { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Returns null if Ready is false because the objective definition is not ready.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetObjective Method

Get the state of this objective for a particular user.

Syntax

[Sansar.Script.Interface]
public void GetObjective (Sansar.Script.SessionId agent)

Parameters

agent
The Sansar.Script.SessionId of the user.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetObjective Method

Get the state of this objective for a particular user.

Syntax

[Sansar.Script.Interface]
public void GetObjective (AgentPrivate agent)

Parameters

agent
Obtain the objective state for this user.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetObjective Method

Get the state of this objective for a particular user.

Syntax

[Sansar.Script.Interface]
public void GetObjective (Sansar.Script.SessionId agent, Action<ObjectiveDefinition.GetObjectiveData> handler)

Parameters

agent
The Sansar.Script.SessionId of the user.
handler
Handler to be called when the event completes.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetObjective Method

Get the state of this objective for a particular user.

Syntax

[Sansar.Script.Interface]
public void GetObjective (AgentPrivate agent, Action<ObjectiveDefinition.GetObjectiveData> handler)

Parameters

agent
Obtain the objective state for this user.
handler
Handler to be called when the event completes.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

InitialState Property

The initial state that this objective will have when a user starts the quest

Syntax

[get: Sansar.Script.Interface]
public ObjectiveState InitialState { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Returns None if Ready is false, because the objective definition is not ready.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Ready Property

If the QuestDefinition data is ready.

Syntax

[get: Sansar.Script.Interface]
public bool Ready { get; }

See Also

Value

Documentation for this section has not yet been entered.

Remarks

Returns false until the data has been fetched from the quest service. Once it returns true it will always return true.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

RequiredCount Property

The required count to complete the objective.

Syntax

[get: Sansar.Script.Interface]
public int RequiredCount { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Returns -1 if Ready is false because the objective definition is not ready.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Title Property

The objective title.

Syntax

[get: Sansar.Script.Interface]
public string Title { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Returns null if Ready is false because the objective definition is not ready.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Update Method

Update the ObjectiveDefinition data.

Syntax

[Sansar.Script.Interface]
public void Update ()

Remarks

Use in a WaitFor to wait for the data for the QuestDefinition to be ready. Once data is retrieved and Ready is true it will never again be false.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Update Method

Update the ObjectiveDefinition data.

Syntax

[Sansar.Script.Interface]
public void Update (Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

handler
Handler to be called when the event completes.

Remarks

Use in a WaitFor to wait for the data for the QuestDefinition to be ready. Once data is retrieved and Ready is true it will never again be false.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.