protected virtual void OnTargetingRuleExecuted(TargetingEventArgs e) { if (TargetingRuleExecuted != null) { TargetingRuleExecuted(this, e); } }
protected virtual void OnTargetingRuleMatch(TargetingEventArgs e) { if (TargetingRuleMatch != null) { TargetingRuleMatch(this, e); } }
void Targeting_TargetingRuleExecute(object sender, TargetingEventArgs e) { SetActiveRule(true); }
void Targeting_TargetingRuleExecuted(object sender, TargetingEventArgs e) { try { SetActiveRule(false); } catch (InvalidOperationException ex) { Helpers.Debug.Report(ex); } }
void Targeting_TargetingRuleMatch(object sender, TargetingEventArgs e) { if (Targeter.Instance.IsAttacking) return; List<Creature> ordered = new List<Creature>(); ordered = e.Creatures.OrderBy(c => c, GetComparer(0)).ThenBy(c => c, GetComparer(1)) .ThenBy(c => c, GetComparer(2)).ThenBy(c => c, GetComparer(3)).ToList(); CaveBot.Stop(); Queues.Add(Task.TargetingExecuteRule, new Action(() => { ExecuteRule(ordered[0], e.TargetingRule, e.TargetingRule.SettingID); }), 95, 100, false, false); }