Beispiel #1
0
        public static async Task <bool> Combat()
        {
            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            if (Core.Me.CurrentTarget == null)
            {
                return(false);
            }

            if (!Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            #region Positional Overlay
            if (BaseSettings.Instance.UsePositionalOverlay)
            {
                if (Core.Me.HasAura(Auras.SharperFangandClaw))
                {
                    if (!Core.Me.CurrentTarget.IsFlanking)
                    {
                        ViewModels.BaseSettings.Instance.PositionalStatus = "OutOfPosition";
                        ViewModels.BaseSettings.Instance.PositionalText   = "Move To Flank";
                    }
                    else
                    {
                        ViewModels.BaseSettings.Instance.PositionalStatus = "InPosition";
                        ViewModels.BaseSettings.Instance.PositionalText   = "You're In Position";
                    }
                }

                if (Core.Me.HasAura(Auras.EnhancedWheelingThrust))
                {
                    if (!Core.Me.CurrentTarget.IsBehind)
                    {
                        ViewModels.BaseSettings.Instance.PositionalStatus = "OutOfPosition";
                        ViewModels.BaseSettings.Instance.PositionalText   = "Move Behind";
                    }
                    else
                    {
                        ViewModels.BaseSettings.Instance.PositionalStatus = "InPosition";
                        ViewModels.BaseSettings.Instance.PositionalText   = "You're In Position";
                    }
                }

                if (ActionManager.LastSpell == Spells.Disembowel)
                {
                    if (!Core.Me.CurrentTarget.IsBehind)
                    {
                        ViewModels.BaseSettings.Instance.PositionalStatus = "OutOfPosition";
                        ViewModels.BaseSettings.Instance.PositionalText   = "Move Behind";
                    }
                    else
                    {
                        ViewModels.BaseSettings.Instance.PositionalStatus = "InPosition";
                        ViewModels.BaseSettings.Instance.PositionalText   = "You're In Position";
                    }
                }
            }
            #endregion

            #region Off GCD debugging
            if (Utilities.Routines.Dragoon.Jumps.Contains(Casting.LastSpell))
            {
                // Check to see if we're OFF GCD
                if (Spells.TrueThrust.Cooldown == TimeSpan.Zero)
                {
                    // Start the stopwatch if it isn't running
                    if (!JumpGcdTimer.IsRunning)
                    {
                        JumpGcdTimer.Restart();
                    }
                }
            }
            else
            {
                // We didn't use a Jump last, check to see if the stopwatch is running
                if (JumpGcdTimer.IsRunning)
                {
                    // We'll give a 50ms buffer for the time it takes to tick
                    if (JumpGcdTimer.ElapsedMilliseconds > 50)
                    {
                        Logger.WriteInfo($@"We wasted {JumpGcdTimer.ElapsedMilliseconds} ms off GCD");
                    }

                    // Stop the stopwatch
                    JumpGcdTimer.Stop();
                }
            }
            #endregion

            if (await PhysicalDps.Interrupt(DragoonSettings.Instance))
            {
                return(true);
            }
            if (await PhysicalDps.SecondWind(DragoonSettings.Instance))
            {
                return(true);
            }
            if (await PhysicalDps.Bloodbath(DragoonSettings.Instance))
            {
                return(true);
            }

            Utilities.Routines.Dragoon.EnemiesInView = Utilities.Combat.Enemies.Count(r => r.Distance(Core.Me) <= 10 + r.CombatReach && r.InView());

            if (Utilities.Routines.Dragoon.OnGcd && !_usedJumpDuringGcd)
            {
                if (await Jumps.MirageDive())
                {
                    _usedJumpDuringGcd = true;
                    return(true);
                }

                if (await Jumps.Execute())
                {
                    _usedJumpDuringGcd = true;
                    return(true);
                }

                if (await SingleTarget.Geirskogul())
                {
                    return(true);
                }

                if (await Buff.LanceCharge())
                {
                    return(true);
                }
                if (await Aoe.Nastrond())
                {
                    return(true);
                }
                if (await Buff.BloodOfTheDragon())
                {
                    return(true);
                }
                if (await Buff.DragonSight())
                {
                    return(true);
                }
                if (await Buff.BattleLitany())
                {
                    return(true);
                }
                return(await Buff.TrueNorth());
            }

            if (await OffGlobalCooldownRotation())
            {
                _usedJumpDuringGcd = false;
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        public static async Task <bool> Combat()
        {
            if (BotManager.Current.IsAutonomous)
            {
                if (Core.Me.HasTarget)
                {
                    Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
                }
            }

            if (!Core.Me.HasTarget && !Core.Me.InCombat)
            {
                return(false);
            }

            if (!Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }


            #region Off GCD debugging
            if (DragoonRoutine.JumpsList.Contains(Casting.LastSpell))
            {
                // Check to see if we're OFF GCD
                if (Spells.TrueThrust.Cooldown == TimeSpan.Zero)
                {
                    // Start the stopwatch if it isn't running
                    if (!JumpGcdTimer.IsRunning)
                    {
                        JumpGcdTimer.Restart();
                    }
                }
            }
            else
            {
                // We didn't use a Jump last, check to see if the stopwatch is running
                if (JumpGcdTimer.IsRunning)
                {
                    // We'll give a 50ms buffer for the time it takes to tick
                    if (JumpGcdTimer.ElapsedMilliseconds > 50)
                    {
                        Logger.WriteInfo($@"We wasted {JumpGcdTimer.ElapsedMilliseconds} ms off GCD");
                    }

                    // Stop the stopwatch
                    JumpGcdTimer.Stop();
                }
            }
            #endregion

            //Utility
            if (await PhysicalDps.Interrupt(DragoonSettings.Instance))
            {
                return(true);
            }
            if (await PhysicalDps.SecondWind(DragoonSettings.Instance))
            {
                return(true);
            }
            if (await PhysicalDps.Bloodbath(DragoonSettings.Instance))
            {
                return(true);
            }

            if (DragoonRoutine.GlobalCooldown.CanWeave() && !DragoonRoutine.SingleWeaveJumpsList.Contains(Casting.LastSpell))
            {
                //Buffs
                if (await Buff.ForceDragonSight())
                {
                    return(true);
                }
                if (await Buff.LanceCharge())
                {
                    return(true);
                }
                if (await Buff.DragonSight())
                {
                    return(true);
                }
                if (await Buff.BattleLitany())
                {
                    return(true);
                }
                if (await Buff.LifeSurge())
                {
                    return(true);
                }
                if (await Utility.TrueNorth())
                {
                    return(true);
                }

                //oGCD - Jump
                if (await Aoe.WyrmwindThrust())
                {
                    return(true);
                }
                if (await Jumps.MirageDive())
                {
                    return(true);                          //DoubleWeave
                }
                if (await Aoe.Geirskogul())
                {
                    return(true);
                }
                if (await Aoe.Nastrond())
                {
                    return(true);
                }

                if (DragoonRoutine.GlobalCooldown.CanWeave(1))
                {
                    if (await Jumps.HighJump())
                    {
                        return(true);                         //SingleWeave
                    }
                    if (await Jumps.DragonfireDive())
                    {
                        return(true);                              //SingleWeave
                    }
                    if (await Jumps.SpineshatterDive())
                    {
                        return(true);                                //SingleWeave
                    }
                    if (await Jumps.Stardiver())
                    {
                        return(true);                         //SingleWeave
                    }
                }
            }

            if (await Aoe.DraconianFury())
            {
                return(true);
            }
            if (await Aoe.CoerthanTorment())
            {
                return(true);
            }
            if (await Aoe.SonicThrust())
            {
                return(true);
            }
            if (await Aoe.DoomSpike())
            {
                return(true);
            }

            if (await SingleTarget.RaidenThrust())
            {
                return(true);
            }

            // Combo 2
            if (await SingleTarget.FangAndClaw())
            {
                return(true);
            }
            if (await SingleTarget.HeavensThrust())
            {
                return(true);
            }
            if (await SingleTarget.VorpalThrust())
            {
                return(true);
            }

            // Combo 1 + DOT
            if (await SingleTarget.WheelingThrust())
            {
                return(true);
            }
            if (await SingleTarget.ChaoticSpring())
            {
                return(true);
            }
            if (await SingleTarget.Disembowel())
            {
                return(true);
            }

            return(await SingleTarget.TrueThrust());
        }