Beispiel #1
0
        private async Task <bool> InteractingWithUrshi()
        {
            DisablePulse();
            if (RiftData.VendorDialog.IsVisible)
            {
                State = States.UpgradingGems;
                return(false);
            }
            if (!await _interactWithUrshiCoroutine.GetCoroutine())
            {
                return(false);
            }
            await Coroutine.Wait(2500, () => RiftData.VendorDialog.IsVisible);

            _interactWithUrshiCoroutine.Reset();
            if (!RiftData.VendorDialog.IsVisible)
            {
                return(false);
            }

            _gemUpgradesLeft      = 3;
            _enableGemUpgradeLogs = false;
            State = States.UpgradingGems;
            return(false);
        }
Beispiel #2
0
        private async Task <bool> TalkToOrek()
        {
            DisablePulse();
            if (AdvDia.RiftQuest.State == QuestState.InProgress && AdvDia.RiftQuest.Step == RiftStep.Cleared)
            {
                if (!await _talkToOrekCoroutine.GetCoroutine())
                {
                    return(false);
                }
                _talkToOrekCoroutine.Reset();
                if (AdvDia.RiftQuest.Step == RiftStep.Cleared)
                {
                    State = States.MoveToOrek;
                    return(false);
                }
                await Coroutine.Sleep(1200);

                await Coroutine.Wait(TimeSpan.FromSeconds(5), () => !ZetaDia.Me.IsParticipatingInTieredLootRun);

                if (ZetaDia.Me.IsParticipatingInTieredLootRun)
                {
                    Logger.Info("[Rift] Oh well, I seem to think that the rift is still active, that means I'll not be able to clear out my packs properly, sorry in advance.");
                }
            }

            _experienceTracker.StopAndReport("Rift");
            _experienceTracker.Start();
            State = States.TownRun;
            return(false);
        }
Beispiel #3
0
 private async Task <bool> InteractingWithHolyCow()
 {
     EnablePulse();
     if (!await _talkToHolyCowCoroutine.GetCoroutine())
     {
         return(false);
     }
     _talkToHolyCowCoroutine.Reset();
     Logger.Info("[Rift] Mooo moooo....");
     State = States.SearchingForExitPortal;
     return(false);
 }
Beispiel #4
0
        private async Task <bool> OpeningRift()
        {
            if (RiftData.RiftWorldIds.Contains(AdvDia.CurrentWorldId))
            {
                State = States.OnNewRiftLevel;
                return(false);
            }
            DisablePulse();
            if (!await _interactWithRiftStoneInteractionCoroutine.GetCoroutine())
            {
                return(false);
            }
            await Coroutine.Wait(2500, () => UIElements.RiftDialog.IsVisible);

            _interactWithRiftStoneInteractionCoroutine.Reset();
            if (!UIElements.RiftDialog.IsVisible)
            {
                return(false);
            }
            _riftStartTime = DateTime.UtcNow;

            long empoweredCost;

            if (_RiftType == RiftType.Greater && _options.IsEmpowered && RiftData.EmpoweredRiftCost.TryGetValue(_level, out empoweredCost) && ZetaDia.PlayerData.Coinage >= empoweredCost)
            {
                Logger.Info("Opening Empowered Greater Rift (Cost={0})", empoweredCost);
                ZetaDia.Me.OpenRift(_level, true);
            }
            else
            {
                Logger.Info("Opening {0} Rift", _RiftType);
                ZetaDia.Me.OpenRift(_level);
            }

            if (_level == -1)
            {
                await Coroutine.Sleep(5000);

                if (IsRiftPortalOpen)
                {
                    _prePortalWorldDynamicId = AdvDia.CurrentWorldDynamicId;
                    State = States.EnteringRift;
                }
            }
            else
            {
                await Coroutine.Wait(30000, () => ZetaDia.CurrentRift.IsStarted && RiftData.RiftWorldIds.Contains(AdvDia.CurrentWorldId) && !ZetaDia.IsLoadingWorld);

                DisablePulse();
                State = States.EnteringGreaterRift;
            }
            return(false);
        }
Beispiel #5
0
        private async Task <bool> OpeningRift()
        {
            if (RiftData.RiftWorldIds.Contains(AdvDia.CurrentWorldId))
            {
                State = States.OnNewRiftLevel;
                return(false);
            }
            DisablePulse();
            if (!await _interactWithRiftStoneInteractionCoroutine.GetCoroutine())
            {
                return(false);
            }
            await Coroutine.Wait(2500, () => UIElements.RiftDialog.IsVisible);

            _interactWithRiftStoneInteractionCoroutine.Reset();
            if (!UIElements.RiftDialog.IsVisible)
            {
                return(false);
            }
            _riftStartTime = DateTime.UtcNow;
            ZetaDia.Me.OpenRift(_level);
            if (_level == -1)
            {
                await Coroutine.Sleep(5000);

                if (IsRiftPortalOpen)
                {
                    _prePortalWorldDynamicId = AdvDia.CurrentWorldDynamicId;
                    State = States.EnteringRift;
                }
            }
            else
            {
                await Coroutine.Wait(30000, () => ZetaDia.CurrentRift.IsStarted && RiftData.RiftWorldIds.Contains(AdvDia.CurrentWorldId) && !ZetaDia.IsLoadingWorld);

                DisablePulse();
                State = States.EnteringGreaterRift;
            }
            return(false);
        }
        private async Task <bool> InteractingWithUrshi()
        {
            DisablePulse();
            if (RiftData.VendorDialog.IsVisible)
            {
                State = States.UpgradingGems;
                return(false);
            }

            var urshi = ZetaDia.Actors.GetActorsOfType <DiaUnit>().FirstOrDefault(a => a.IsFullyValid() && a.ActorSnoId == RiftData.UrshiSNO);

            if (urshi == null)
            {
                Core.Logger.Debug("[UpgradeGems] Can't find the Urshi lady :(");
                State = States.Failed;
                return(false);
            }

            if (!await _interactWithUrshiCoroutine.GetCoroutine())
            {
                return(false);
            }

            await Coroutine.Wait(2500, () => RiftData.VendorDialog.IsVisible);

            _interactWithUrshiCoroutine.Reset();

            if (!RiftData.VendorDialog.IsVisible)
            {
                return(false);
            }

            _gemUpgradesLeft      = 3;
            _enableGemUpgradeLogs = false;
            State = States.UpgradingGems;
            return(false);
        }