コード例 #1
0
ファイル: ScriptQuests.cs プロジェクト: gloist/RBot
        /// <summary>
        /// Checks if the specified quest is a completed daily quest.
        /// </summary>
        /// <param name="id">The id of the quest.</param>
        /// <returns>Whether or not the specified quest is a daily quest that the player has already completed.</returns>
        public bool IsDailyComplete(int id)
        {
            Bot.Wait.ForTrue(() => QuestTree.Contains(x => x.ID == id), () => Load(id), 20);
            Quest q = QuestTree.Find(x => x.ID == id);

            return(q != null && q.Field != null && Bot.CallGameFunction <int>("world.getAchievement", q.Field, q.Index) != 0);
        }
コード例 #2
0
 private Quest EnsureLoaded(int id)
 {
     Bot.Wait.ForTrue(() => QuestTree.Contains(x => x.ID == id), () => Load(id), 20);
     return(QuestTree.Find(q => q.ID == id));
 }