示例#1
0
 /// <summary>
 /// Determines if tracking is enabled for a quest.
 /// </summary>
 /// <returns><c>true</c> if tracking enabled on the specified quest; otherwise, <c>false</c>.</returns>
 /// <param name="questTitle">Quest title.</param>
 public static bool IsQuestTrackingEnabled(string questTitle)
 {
     return(IsQuestTrackingAvailable(questTitle)
                         ? DialogueLua.GetQuestField(questTitle, "Track").AsBool
                         : false);
 }
示例#2
0
 /// <summary>
 /// Determines if quest tracking is available (that is, if the quest has a "Track" field).
 /// </summary>
 /// <returns><c>true</c> if quest tracking is available; otherwise, <c>false</c>.</returns>
 /// <param name="questTitle">Quest title.</param>
 public static bool IsQuestTrackingAvailable(string questTitle)
 {
     return(DialogueLua.GetQuestField(questTitle, "Trackable").AsBool);
 }
示例#3
0
 /// <summary>
 /// Gets the quest entry count.
 /// </summary>
 /// <returns>The quest entry count.</returns>
 /// <param name="questTitle">Title of the quest.</param>
 public static int GetQuestEntryCount(string questTitle)
 {
     return(DialogueLua.GetQuestField(questTitle, "Entry_Count").AsInt);
 }
示例#4
0
        /// <summary>
        /// Gets the state of the quest entry.
        /// </summary>
        /// <returns>The quest entry state.</returns>
        /// <param name="questTitle">Title of the quest.</param>
        /// <param name="entryNumber">Entry number.</param>
        public static QuestState GetQuestEntryState(string questTitle, int entryNumber)
        {
            string s = DialogueLua.GetQuestField(questTitle, GetEntryStateFieldName(entryNumber)).AsString;

            return(StringToState(s));
        }
示例#5
0
 /// <summary>
 /// Gets the quest state.
 /// </summary>
 /// <returns>
 /// The quest state.
 /// </returns>
 /// <param name='title'>
 /// Title of the quest.
 /// </param>
 /// <example>
 /// if (QuestLog.QuestState("Kill 5 Rats") == QuestState.Active) {
 ///     Smith.Say("Killing rats, eh? Here, take this hammer.");
 /// }
 /// </example>
 public static QuestState GetQuestState(string title)
 {
     return(StringToState(DialogueLua.GetQuestField(title, "State").AsString));
 }