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); }
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); }
public virtual bool ShouldWalkToBuff(out Vector3 position) { position = Vector3.Zero; if (Target == null) { return(false); } var buffPosition = Targeting.BestBuffPosition(15f, Player.Position, Player.CurrentHealthPct > 0.65, out position); if (buffPosition && Player.Position.Distance2D(position) > 7 && position.EasyNavToPosition(Player.Position)) { Core.Logger.Error(LogCategory.Routine, $"[WalkToBuff] - To Best Buff Position: {position} Distance: {Player.Position.Distance2D(position)}"); return(true); } return(false); }
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); }