Exemplo n.º 1
0
        private async Task MountIfRequired()
        {
            if (shouldMount && !this.playerReader.PlayerBitValues.IsMounted && !playerReader.PlayerBitValues.PlayerInCombat)
            {
                if (this.classConfiguration.Mode != Mode.AttendedGather)
                {
                    shouldMount = false;
                    //if (await LookForTarget()) { return; }
                }

                Log("Mounting if level >=40 (druid 30) and no NPC in sight");
                if (!this.npcNameFinder.MobsVisible)
                {
                    if (this.playerReader.PlayerLevel >= 40 && this.playerReader.PlayerClass != PlayerClassEnum.Druid)
                    {
                        await input.TapStopKey();

                        await Task.Delay(500);

                        await input.Mount(this.playerReader);
                    }
                    if (this.playerReader.PlayerLevel >= 30 && this.playerReader.PlayerClass == PlayerClassEnum.Druid)
                    {
                        this.classConfiguration.ShapeshiftForm
                        .Where(s => s.ShapeShiftFormEnum == ShapeshiftForm.Druid_Travel)
                        .ToList()
                        .ForEach(async k => await this.input.KeyPress(k.ConsoleKey, 325));
                    }
                }
                else
                {
                    logger.LogInformation("Not mounting as can see NPC.");
                }
                input.SetKeyState(ConsoleKey.UpArrow, true, false, "FollowRouteAction 3");
            }
        }