Ejemplo n.º 1
0
        /// <summary>
        /// Remove invalid healableunits.
        /// </summary>
        public static void Remove()
        {
            try
            {
                if (Adding)
                {
                    return;
                }

                Removing = true;

                var grp = ListofHealableUnits.Where(n => !HealableUnit.Filter(n.ToUnit())).ToList();
                foreach (var unit in grp.Where(unit => ListofHealableUnits.IndexOf(unit) != -1))
                {
                    ListofHealableUnits.RemoveAt(ListofHealableUnits.IndexOf(unit)); // remove
                    CLULogger.TroubleshootLog(" Success Removed: {0} no longer a valid healableunit.", CLULogger.SafeName(unit.ToUnit()));
                }

                Removing = false;
            }
            catch (Exception ex)
            {
                CLULogger.DiagnosticLog("Remove : {0}", ex);
            }
        }
Ejemplo n.º 2
0
 /// <summary>Targeting myself when no target</summary>
 /// <param name="cond">The conditions that must be true</param>
 /// <returns>Target myself</returns>
 public static Composite EnsureTarget(CanRunDecoratorDelegate cond)
 {
     return(new Decorator(
                cond,
                new Sequence(
                    new Action(a => CLULogger.TroubleshootLog("[CLU] " + CLU.Version + ": CLU targeting activated. I dont have a target, someone must have died. Targeting myself")),
                    new Action(a => Me.Target()))));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Prints the contents of teh List of HealableUnits
 /// </summary>
 private static void Print()
 {
     CLULogger.TroubleshootLog("HealableUnit List has {0} elements.", ListofHealableUnits.Count);
     for (int i = 0; i < ListofHealableUnits.Count; i++)
     {
         CLULogger.TroubleshootLog(" {0} : {1} Tank: {2}", ListofHealableUnits[i].Name, i, ListofHealableUnits[i].Tank);
     }
 }
Ejemplo n.º 4
0
 /// <summary>Handles pushing the extra action button in DS Encounters</summary>
 /// <returns>The extra action button.</returns>
 public static Composite ExtraActionButton()
 {
     return(new Decorator(
                x => (IsFadingLight() || IsHourofTwilight()) && CLUSettings.Instance.ClickExtraActionButton, //|| IsShrapnel() todo: removed...cos its retarted.
                new Sequence(
                    new Action(a => CLULogger.TroubleshootLog(" [ExtraActionButton] Time to get Lazy!")),
                    Item.RunMacroText("/click ExtraActionButton1", ret => true, "[Push Button] ExtraActionButton1"),
                    new ActionAlwaysFail()))); // continue down the tree
 }