Ejemplo n.º 1
0
        public async Task <bool> Run()
        {
            if (RaptureAtkUnitManager.GetWindowByName("DeepDungeonResult") != null)
            {
                GameStatsManager.Died();
                Logger.Warn($"We have died...");
                RaptureAtkUnitManager.GetWindowByName("DeepDungeonResult").SendAction(1, 3, uint.MaxValue);
                await Coroutine.Sleep(250);

                return(true);
            }
            if (NotificationRevive.IsOpen)
            {
                NotificationRevive.Click();
                await Coroutine.Wait(250, () => SelectYesno.IsOpen);

                SelectYesno.ClickYes();
                return(true);
            }
            if (ClientGameUiRevive.ReviveState == ReviveState.Dead && SelectYesno.IsOpen)
            {
                SelectYesno.ClickYes();
                return(true);
            }
            if (Core.Me.IsDead)
            {
                TreeRoot.StatusText = "I am dead. No window to use...";
                await Coroutine.Sleep(250);

                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public override async Task <bool> Run()
        {
            // Open and accept revive notification
            if (NotificationRevive.IsOpen)
            {
                Logger.LogInformation(Translations.LOG_REVIVE_OPENED);
                NotificationRevive.Click();

                await Coroutine.Wait(250, () => SelectYesno.IsOpen);

                if (SelectYesno.IsOpen)
                {
                    Logger.LogInformation(Translations.LOG_REVIVE_ACCEPTED);
                    SelectYesno.ClickYes();
                }

                return(HANDLED_EXECUTION);
            }

            // No opportunity to revive yet?
            if (Core.Player.IsDead || Core.Player.IsDying)
            {
                StatusBar.Text = Translations.STATUS_DEAD_WAITING;
                await Coroutine.Sleep(250);

                return(HANDLED_EXECUTION);
            }

            return(PASS_EXECUTION);
        }