Beispiel #1
0
 public void GotoPick()
 {
     safeMoveTo(WoWMathHelper.CalculatePointAtSide(getPick().Location, getPick().Rotation, PickRange - 2, MEBEHIND()));
     if (Me.Combat)
     {
         return;
     }
 }
        private async Task <bool> Fight()
        {
            if (!Me.Combat)
            {
                return(false);
            }
            var currentTarget = Me.CurrentTarget;

            if (currentTarget == null)
            {
                return(false);
            }

            if (currentTarget.IsDead)
            {
                Me.ClearTarget();
                return(true);
            }

            // TODO: Find better side point. Rewrite to use mesh sampling instead.
            Vector3 sideLoc = WoWMathHelper.CalculatePointAtSide(currentTarget.Location, Me.CurrentTarget.Rotation, 20f, false);

            if (_cachedSideLoc == Vector3.Zero || Vector3.DistanceSquared(sideLoc, _cachedSideLoc) > 8 * 8)
            {
                _cachedSideLoc = sideLoc;
            }

            if (Navigator.MoveTo(_cachedSideLoc) == MoveResult.PathGenerationFailed)
            {
                _cachedSideLoc = Vector3.Zero;
            }

            if (!MyMount.ActiveAuras.ContainsKey("Defend") || (MyMount.ActiveAuras.ContainsKey("Defend") && MyMount.ActiveAuras["Defend"].StackCount < 3))
            {
                //Me.CurrentTarget.Face();
                UsePetSkill("Defend");
                UsePetSkill("Charge");
                await CommonCoroutines.SleepForRandomReactionTime();
            }
            else
            {
                if (currentTarget.Distance > 8)
                {
                    currentTarget.Face();
                }
                using (StyxWoW.Memory.AcquireFrame())
                {
                    UsePetSkill("Thrust");
                    UsePetSkill("Charge");
                    UsePetSkill("Shield-Breaker");
                    await CommonCoroutines.SleepForRandomReactionTime();
                }
            }
            return(true);
        }
 private bool MoveTo(WoWUnit u)
 {
     if (rng == null)
     {
         rng = new Random();
     }
     if (CanCast("Holy Radiance"))
     {
         Cast("Holy Radiance", "Buff", "Moving faaaaaaaaaaster");
     }
     if (!Me.IsMoving && u != null)//&& u.Distance > 35)
     {
         Navigator.MoveTo(WoWMathHelper.CalculatePointAtSide(u.Location, u.Rotation, rng.Next(10), rng.Next(2) == 1));
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #4
0
        Composite HeroicLeap()
        {
            return(new Decorator(ret => StyxWoW.Me.CurrentTarget.HasAura("Colossus Smash") && SpellManager.CanCast("Heroic Leap"),
                                 new Action(ret =>
            {
                var tpos = StyxWoW.Me.CurrentTarget.Location;
                var trot = StyxWoW.Me.CurrentTarget.Rotation;
                var leapRight = WoWMathHelper.CalculatePointAtSide(tpos, trot, 5, true);
                var leapLeft = WoWMathHelper.CalculatePointAtSide(tpos, trot, 5, true);


                var myPos = StyxWoW.Me.Location;


                var leftDist = leapLeft.Distance(myPos);
                var rightDist = leapRight.Distance(myPos);


                var leapPos = WoWMathHelper.CalculatePointBehind(tpos, trot, 8);


                if (leftDist > rightDist && leftDist <= 40 && leftDist >= 8)
                {
                    leapPos = leapLeft;
                }
                else if (rightDist > leftDist && rightDist <= 40 && rightDist >= 8)
                {
                    leapPos = leapLeft;
                }


                SpellManager.Cast("Heroic Leap");
                SpellManager.ClickRemoteLocation(leapPos);
                StyxWoW.Me.CurrentTarget.Face();
            })));
        }
Beispiel #5
0
        private async Task <bool> Fight()
        {
            if (!Me.Combat)
            {
                return(false);
            }
            var currentTarget = Me.CurrentTarget;

            if (currentTarget == null)
            {
                return(false);
            }

            if (currentTarget.IsDead)
            {
                Me.ClearTarget();
                return(true);
            }
            //Me.CurrentTarget.Face();
            //if (Me.CurrentTarget.Distance > 10)
            //   Navigator.MoveTo(Me.CurrentTarget.Location);

            //var moveTo = WoWMathHelper.CalculatePointFrom(StyxWoW.Me.Location, StyxWoW.Me.CurrentTarget.Location, -15f);
            //var moveTo = WoWMathHelper.CalculatePointBehind(StyxWoW.Me.CurrentTarget.Location,Me.CurrentTarget.Rotation, -15f);
            var moveTo = WoWMathHelper.CalculatePointAtSide(currentTarget.Location, Me.CurrentTarget.Rotation, 20f, false);

            //var moveTo = WoWMathHelper.GetPointAt(Me.Location, 20,Me.Rotation,0);
            if (Navigator.CanNavigateFully(StyxWoW.Me.Location, moveTo))
            {
                Navigator.MoveTo(moveTo);
            }

            /* if (Me.CurrentTarget.Distance < 10)
             *          {
             *                  Navigator.PlayerMover.Move(
             *                          WoWMovement.MovementDirection.Backwards);
             *          }
             *          else
             *          {
             *                  Navigator.PlayerMover.MoveStop();
             *          }*/


            if (!MyMount.ActiveAuras.ContainsKey("Defend") || (MyMount.ActiveAuras.ContainsKey("Defend") && MyMount.ActiveAuras["Defend"].StackCount < 3))
            {
                //Me.CurrentTarget.Face();
                UsePetSkill("Defend");
                UsePetSkill("Charge");
                await CommonCoroutines.SleepForRandomReactionTime();
            }
            else
            {
                if (currentTarget.Distance > 8)
                {
                    currentTarget.Face();
                }
                using (StyxWoW.Memory.AcquireFrame())
                {
                    UsePetSkill("Thrust");
                    UsePetSkill("Charge");
                    UsePetSkill("Shield-Breaker");
                    await CommonCoroutines.SleepForRandomReactionTime();
                }
            }
            return(true);
        }