/// <summary> /// Executes the specified execution. /// </summary> /// <param name="execution">The execution.</param> private void Execute(CommonEx.Objects.LastBreath execution) { if (this.provider.ShouldCastNow(execution, SweepingBlade.PathBaseCopy)) { GlobalVariables.CastManager.Queque.Enqueue(1, () => GlobalVariables.Spells[SpellSlot.R].CastOnUnit(execution.Target)); } }
/// <summary> /// Resets the properties /// </summary> private void SoftReset() { if (!this.executions.Any() || this.ValidExecution == null || !this.ValidExecution.IsValid()) { return; } this.executions = new List <CommonEx.Objects.LastBreath>(); this.ValidExecution = new CommonEx.Objects.LastBreath(); }
private void BuildExecutions() { foreach (var hero in HeroManager.Enemies.Where(x => ((Obj_AI_Base)x).IsAirbone())) { var execution = new CommonEx.Objects.LastBreath(hero); if (!this.executions.Contains(execution)) { this.executions.Add(execution); } } }
/// <summary> /// Decides for an execution and executes. /// </summary> private void DecideAndExecute() { var advanced = this.Menu.SubMenu(this.Menu.Name + "Advanced"); if (!this.executions.Any()) { return; } // TODO: ADD safetyvalue/dangervalue auto mode switch (advanced.Item(advanced.Name + "EvaluationLogic").GetValue <StringList>().SelectedIndex) { // Damage case 0: this.ValidExecution = this.executions.MaxOrDefault(x => x.DamageDealt); break; // Count case 1: this.ValidExecution = this.executions.MaxOrDefault(x => x.AffectedEnemies.Count); break; // Priority case 2: this.ValidExecution = this.executions.MaxOrDefault(x => x.Priority); break; // Auto case 3: break; } if (this.ValidExecution != null) { this.Execute(this.ValidExecution); } }