Esempio n. 1
0
 protected virtual void OnTargetingRuleExecuted(TargetingEventArgs e)
 {
     if (TargetingRuleExecuted != null)
     {
         TargetingRuleExecuted(this, e);
     }
 }
Esempio n. 2
0
 protected virtual void OnTargetingRuleMatch(TargetingEventArgs e)
 {
     if (TargetingRuleMatch != null)
     {
         TargetingRuleMatch(this, e);
     }
 }
Esempio n. 3
0
 void Targeting_TargetingRuleExecute(object sender, TargetingEventArgs e)
 {
     SetActiveRule(true);
 }
Esempio n. 4
0
 void Targeting_TargetingRuleExecuted(object sender, TargetingEventArgs e)
 {
     try
     {
         SetActiveRule(false);
     }
     catch (InvalidOperationException ex)
     {
         Helpers.Debug.Report(ex);
     }
 }
Esempio n. 5
0
        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);
        }