Interface IQuestController
Interface for controllers that manage quest instances and lifecycle for a character.
public interface IQuestController : ICharacterBehaviour
- Inherited Members
Fields
OnObjectiveUpdated
Raised when an objective is updated. Parameters: character, quest name, objective index, amount.
public static Action<ICharacter, string, int, long> OnObjectiveUpdated
Field Value
- Action<ICharacter, string, int, long>
OnQuestAbandoned
Raised when a quest is abandoned and removed from the quest log. Parameters: character, quest name.
public static Action<ICharacter, string> OnQuestAbandoned
Field Value
OnQuestAccepted
Raised when a quest is accepted. Parameters: character, quest template.
public static Action<ICharacter, QuestTemplate> OnQuestAccepted
Field Value
OnQuestComplete
Raised when all objectives are met and the quest transitions to Complete. Parameters: character, quest name.
public static Action<ICharacter, string> OnQuestComplete
Field Value
OnQuestFailed
Raised when a quest is failed (timer expired, etc.). Parameters: character, quest name.
public static Action<ICharacter, string> OnQuestFailed
Field Value
OnQuestTurnedIn
Raised when a quest is turned in and rewards are granted. Parameters: character, quest name.
public static Action<ICharacter, string> OnQuestTurnedIn
Field Value
Properties
Quests
Read-only accessor for all active quests keyed by template name.
Dictionary<string, QuestInstance> Quests { get; }
Property Value
Methods
AbandonQuest(string)
Abandons a quest, removing it from the character's quest log.
bool AbandonQuest(string questName)
Parameters
questNamestringThe name of the quest to abandon.
Returns
- bool
True if the quest was found and removed.
Acquire(QuestTemplate)
Accepts a new quest for the character. Ignored if already acquired.
void Acquire(QuestTemplate template)
Parameters
templateQuestTemplateThe quest template to accept.
AdvanceObjective(string, int, long)
Advances a specific objective within a quest by the given amount.
void AdvanceObjective(string questName, int objectiveIndex, long amount)
Parameters
questNamestringThe name of the quest.
objectiveIndexintThe index of the objective to advance.
amountlongThe amount to increment.
FailQuest(string)
Fails an active quest.
bool FailQuest(string questName)
Parameters
questNamestringThe name of the quest to fail.
Returns
- bool
True if the quest was successfully failed.
SetQuest(QuestTemplate, QuestStatus, long[])
Sets quest state from broadcast or database load. Used by client-side sync.
void SetQuest(QuestTemplate template, QuestStatus status, long[] objectiveValues)
Parameters
templateQuestTemplateThe quest template.
statusQuestStatusThe status to set.
objectiveValueslong[]Per-objective progress values.
TryCompleteQuest(string)
Attempts to complete a quest, transitioning it from Active to Complete. Returns false if objectives are not met or the quest is not active.
bool TryCompleteQuest(string questName)
Parameters
questNamestringThe name of the quest to complete.
Returns
- bool
True if the quest transitioned to Complete.
TryGetQuest(string, out QuestInstance)
Attempts to retrieve a quest instance by template name.
bool TryGetQuest(string name, out QuestInstance quest)
Parameters
namestringThe name of the quest to look up.
questQuestInstanceThe found quest instance, or null if not found.
Returns
- bool
True if the quest is found, false otherwise.
TurnInQuest(string)
Turns in a completed quest, granting rewards and transitioning to TurnedIn.
bool TurnInQuest(string questName)
Parameters
questNamestringThe name of the quest to turn in.
Returns
- bool
True if the quest was successfully turned in.