Ejemplo n.º 1
0
        internal Quest AcceptQuest(int i, Cycle c)
        {
            DailyQuest q     = (c == Cycle.Daily ? dailies : weeklies)[i];
            Quest      quest = q.quest;

            q.quest = null;
            q.next  = DateTime.UtcNow.AddDays((int)c);
            Save();
            return(quest);
        }
Ejemplo n.º 2
0
        internal (bool, string) LoadQuest(Player player, int i, Cycle time)
        {
            DailyQuest quest = (time == Cycle.Daily ? dailies : weeklies)[i];

            if (quest.level > player.level)
            {
                return(false, $"[Unlock at level {quest.level}]");
            }

            if (quest.next > DateTime.UtcNow)
            {
                return(false, $"[{Timers.CoolDownToString(quest.next)}]");
            }

            if (quest.quest == null)
            {
                quest.quest = Quest.Random(time == Cycle.Daily ? 1 : 2);
                Save();
            }

            return(player.quests.Count < Quest.MaxQuests, $" **__{quest.quest.title}__** {Environment.NewLine} {quest.quest.description}");
        }