Esempio n. 1
0
        /// <summary>
        /// Adds a quest entry to a quest.
        /// </summary>
        /// <param name="questTitle">Title of the quest.</param>
        /// <param name="entryNumber">Entry number.</param>
        /// <param name="description">The quest entry description.</param>
        public static void AddQuestEntry(string questTitle, string description)
        {
            int entryCount = GetQuestEntryCount(questTitle);

            entryCount++;
            DialogueLua.SetQuestField(questTitle, "Entry_Count", entryCount);
            string entryFieldName = GetEntryFieldName(entryCount);

            DialogueLua.SetQuestField(questTitle, entryFieldName, DialogueLua.DoubleQuotesToSingle(description));
            string entryStateFieldName = GetEntryStateFieldName(entryCount);

            DialogueLua.SetQuestField(questTitle, entryStateFieldName, "unassigned");
        }
Esempio n. 2
0
 /// <summary>
 /// Sets quest tracking on or off.
 /// </summary>
 /// <param name="questTitle">Quest title.</param>
 /// <param name="value">If set to <c>true</c>, tracking is enabled.</param>
 public static void SetQuestTracking(string questTitle, bool value)
 {
     DialogueLua.SetQuestField(questTitle, "Track", value);
 }
Esempio n. 3
0
 /// <summary>
 /// Sets the state of the quest entry.
 /// </summary>
 /// <param name="questTitle">Title of the quest.</param>
 /// <param name="entryNumber">Entry number.</param>
 /// <param name="state">State.</param>
 public static void SetQuestEntryState(string questTitle, int entryNumber, QuestState state)
 {
     DialogueLua.SetQuestField(questTitle, GetEntryStateFieldName(entryNumber), StateToString(state));
     SendUpdateTracker();
 }
Esempio n. 4
0
 /// <summary>
 /// Sets the quest description for a specified state.
 /// </summary>
 /// <param name='title'>
 /// Title of the quest.
 /// </param>
 /// <param name='state'>
 /// Set the description for this state (i.e., regular, success, or failure).
 /// </param>
 /// <param name='description'>
 /// The description.
 /// </param>
 public static void SetQuestDescription(string title, QuestState state, string description)
 {
     DialogueLua.SetQuestField(title, GetDefaultDescriptionFieldForState(state), description);
 }
Esempio n. 5
0
 /// <summary>
 /// Sets the quest state.
 /// </summary>
 /// <param name='title'>
 /// Title of the quest.
 /// </param>
 /// <param name='state'>
 /// New state.
 /// </param>
 /// <example>
 /// if (PiedPiperIsFree) {
 ///     QuestLog.SetQuestState("Kill 5 Rats", QuestState.Failure);
 /// }
 /// </example>
 public static void SetQuestState(string title, QuestState state)
 {
     DialogueLua.SetQuestField(title, "State", StateToString(state));
     SendUpdateTracker();
 }