The QuestDefinition stores the data that is used to create quest instances for users.
public class QuestDefinition : Sansar.Script.InstanceInterfaceMembers at a glance
| Kind | Members |
|---|---|
| Properties | Description · ObjectiveDefinitions · Ready · Title |
| Methods | GetQuest · ToString · Update |
Properties
Description
public string Description { get; }The description of this quest.
ObjectiveDefinitions
public ObjectiveDefinition[] ObjectiveDefinitions { get; }All the ObjectiveDefinitions for this QuestDefinition.
Remarks
The ObjectiveDefinitions for this QuestDefinition
Ready
public bool Ready { get; }If the QuestDefinition data is ready.
Remarks
Returns false until the data has been fetched from the quest service. Once it returns true it will always return true.
Title
public string Title { get; }The title of this quest.
Methods
GetQuest
public void GetQuest(Sansar.Script.SessionId agent)Get the state of this quest for a particular user.
| Parameter | Type | Description |
|---|---|---|
agent | Sansar.Script.SessionId | The SessionId of the user. |
public void GetQuest(AgentPrivate agent)Get the state of this quest for a particular user.
| Parameter | Type | Description |
|---|---|---|
agent | AgentPrivate | Obtain the quest state for this user. |
public void GetQuest(
Sansar.Script.SessionId agent,
Action<QuestDefinition.GetQuestData> handler
)Get the state of this quest for a particular user.
| Parameter | Type | Description |
|---|---|---|
agent | Sansar.Script.SessionId | The SessionId of the user. |
handler | Action<QuestDefinition.GetQuestData> | Handler to be called when the event completes. |
public void GetQuest(
AgentPrivate agent,
Action<QuestDefinition.GetQuestData> handler
)Get the state of this quest for a particular user.
| Parameter | Type | Description |
|---|---|---|
agent | AgentPrivate | Obtain the quest state for this user. |
handler | Action<QuestDefinition.GetQuestData> | Handler to be called when the event completes. |
ToString
public override string ToString()A string representation of this object.
Returns: string — A string representation of this object.
Remarks
The format of this string may change between releases.
Update
public void Update()Update the QuestDefinition data.
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.
public void Update(
Action<Sansar.Script.OperationCompleteEvent> handler
)Update the QuestDefinition data.
| Parameter | Type | Description |
|---|---|---|
handler | Action<Sansar.Script.OperationCompleteEvent> | 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.
Used in examples
- QuestDebugExample.cs
- ScriptLibrary/Quest/QuestGiverBase.cs
- ScriptLibrary/Quest/QuestGiverTrigger.cs
- ScriptLibrary/Quest/QuestVisibility.cs
Generated from the Sansar 47.10.0 client ScriptApi snapshot.