Beispiel #1
0
        public virtual bool ShouldWalk(out Vector3 position)
        {
            position = Vector3.Zero;

            var closestGlobe = Targeting.ClosestGlobe(15f);

            if (Player.CurrentHealthPct < 0.50 && Player.Position.EasyNavToPosition(closestGlobe.Position))
            {
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Walk] - Grabbing Health Globe.");
                position = closestGlobe.Position;
                return(true);
            }

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

            if (!Target.IsInLineOfSight)
            {
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Walk] - Target is not in Line Of Sight.");
                position = Target.Position;
                return(true);
            }
            if (Target != null && Target.RadiusDistance > 50f)
            {
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Walk] - To get into Range with Target.");
                position = Target.Position;
                return(true);
            }
            return(false);

            if (_loiterPosition != Vector3.Zero && !_loiterPosition.InCriticalAvoidance() &&
                _loiterPosition.Distance(Player.Position) < 25f)
            {
                position = _loiterPosition;
                return(true);
            }
            else
            {
                position = Targeting.GetLoiterPosition(Target, 25f);
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Walk] - To Best Loiter Position.");
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        public bool ShouldBloodRush(float distance, out Vector3 position)
        {
            position = Vector3.Zero;

            if (!Skills.Necromancer.BloodRush.CanCast())
            {
                return(false);
            }

            var closestGlobe = Targeting.ClosestGlobe(distance);

            if (Player.CurrentHealthPct < 0.50 && Player.Position.EasyNavToPosition(closestGlobe.Position))
            {
                position = closestGlobe.Position;
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Blood Rush] - To get Health Globe.");
                return(true);
            }

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

            if (!Target.IsInLineOfSight)
            {
                position = Target.Position;
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Blood Rush] - Monster is not in LoS.");
                return(true);
            }

            if (Targeting.BestBuffPosition(distance, Player.Position, true, out position) &&
                Target.Position.Distance(position) > 5 && Target.Position.Distance(position) < 12.5f)
            {
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Blood Rush] - To Best Buff Position.");
                return(true);
            }

            if (Target.Position.Distance(position) > 15f)
            {
                position = Target.Position;
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Blood Rush] - Monster is too far away.");
                return(true);
            }
            return(false);
        }
Beispiel #3
0
        public virtual bool ShouldWalk(out Vector3 position)
        {
            position = Vector3.Zero;

            var closestGlobe = Targeting.ClosestGlobe(15f);

            if (Player.CurrentHealthPct < 0.50 && Player.Position.EasyNavToPosition(closestGlobe.Position))
            {
                position = closestGlobe.Position;
                return(true);
            }

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

            if (!Target.IsInLineOfSight)
            {
                position = Target.Position;
                return(true);
            }

            if (Targeting.BestBuffPosition(10f, Player.Position, false, out position) &&
                Player.Position.Distance(position) > 5 && position.EasyNavToPosition(Player.Position))
            {
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Walk] - To Best Buff Position.");
                return(true);
            }
            return(CurrentTarget != null && (!Target.IsInLineOfSight || Target.RadiusDistance > 65f));

            if (_loiterPosition != Vector3.Zero && !_loiterPosition.InCriticalAvoidance() &&
                _loiterPosition.Distance(Player.Position) < 25f)
            {
                position = _loiterPosition;
                return(true);
            }
            else
            {
                position = Targeting.GetLoiterPosition(Target, 25f);
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Walk] - To Best Loiter Position.");
                return(true);
            }

            return(false);
        }
Beispiel #4
0
        public bool ShouldBloodRush(float distance, out Vector3 position)
        {
            position = Vector3.Zero;

            if (!Skills.Necromancer.BloodRush.CanCast())
            {
                return(false);
            }

            var closestGlobe = Targeting.ClosestGlobe(distance);

            if (Player.CurrentHealthPct < 0.50)
            {
                position = closestGlobe.Position;
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Blood Rush] - To get Health Globe.");
                return(true);
            }

            if (Target == null || Skills.Necromancer.BloodRush.TimeSinceUse < 2500)
            {
                return(false);
            }

            //if (!Target.IsInLineOfSight)
            //{
            //    position = Target.Position;
            //    Core.Logger.Error(LogCategory.Routine,
            //        $"[Blood Rush] - Monster is not in LoS.");
            //    return true;
            //}

            var buffPosition = Targeting.BestBuffPosition(distance, Target.Position, Player.CurrentHealthPct > 0.35, out position);

            if (buffPosition && Player.Position.Distance2D(position) > 7)
            {
                Core.Logger.Error(LogCategory.Routine,
                                  $"[Blood Rush] - To Best Buff Position: {position} Distance: {Player.Position.Distance2D(position)}");
                return(true);
            }
            return(false);
        }