Exemplo n.º 1
0
        public override async Task <bool> StartTask()
        {
            var bounty = ZetaDia.Storage.Quests.Bounties
                         .Where(c => c.Act == Act && c.Info.State != QuestState.Completed && !_blacklist.Contains(c.Quest))
                         .OrderByDescending(c => (int)c.Quest)
                         .FirstOrDefault();

            // Bounties completed in this Act.
            if (bounty == null)
            {
                return(true);
            }

            _bounty = BountyCoroutineFactory.GetBounty(bounty);
            if (_bounty == null)
            {
                Core.Logger.Error($"[RunBountySimple] Bounty is not supported ({QuestId}), ending tag.");
                _blacklist.Add(bounty.Quest);

                // Pick the next...
                return(await StartTask());
            }

            _bounty.Reset();
            return(false);
        }
Exemplo n.º 2
0
 public override void OnStart()
 {
     //AdvDia.Update(true);
     if (!ValidActs.Contains(Act))
     {
         Logger.Error("[RunActBounties] Invalid act, valid acts are {0}", string.Join(", ", ValidActs));
         _isDone = true;
     }
     _bounties = BountyCoroutineFactory.GetActBounties(Act).OrderBy(a => a.QuestData.Act).ThenBy(a => a.QuestData.InternalName).ToList();
     _completeActBountiesCoroutine = new CompleteActBountiesCoroutine(Act);
 }
Exemplo n.º 3
0
        public override void OnStart()
        {
            var bountyInfo = ZetaDia.ActInfo.Bounties.FirstOrDefault(b => (int)b.Quest == QuestId);

            _bounty = BountyCoroutineFactory.GetBounty(bountyInfo);
            if (_bounty == null)
            {
                Logger.Error("[RunBountyTag] Unsupported QuestId ({0}), ending tag.", QuestId);
                _isDone = true;
            }
        }
Exemplo n.º 4
0
        public override async Task <bool> StartTask()
        {
            var bountyInfo = ZetaDia.Storage.Quests.Bounties.FirstOrDefault(b => (int)b.Quest == QuestId);

            if (bountyInfo == null)
            {
                Core.Logger.Error($"[RunBountyTag] Bounty is not available in this game.");
                return(true);
            }

            _bounty = BountyCoroutineFactory.GetBounty(bountyInfo);
            if (_bounty == null)
            {
                Core.Logger.Error($"[RunBountyTag] Bounty is not supported ({QuestId}), ending tag.");
                return(true);
            }

            _bounty.Reset();
            return(false);
        }
Exemplo n.º 5
0
 public ActBountiesCoroutine(Act act)
 {
     Act = act;
     _completeActBountiesCoroutine = new CompleteActBountiesCoroutine(act);
     _bountyCoroutines             = BountyCoroutineFactory.GetActBounties(act);
 }