public static Composite SelectMultiDotTarget() { //We should MultiDot return(new Decorator( ret => (AltarboySettings.Instance.EnableMultiDotTargeting && TargetManager.NumOfHostileWithinRange(Me, 40) > 1), new PrioritySelector( //Dot the current target first... new Decorator(ret => TargetManager.TargetNeedsMultiDot(ActiveTarget), new TreeSharp.Action(delegate { SetTarget(ActiveTarget, TargetMode.MultiDot); }) ), //Dot any other targets next new Decorator(ret => TargetManager.PossibleTargets.Any(TargetManager.TargetNeedsMultiDot), new TreeSharp.Action(delegate { var theTarget = TargetManager.PossibleTargets.OrderByDescending(tar => tar.CurrentHealth).First(TargetManager.TargetNeedsMultiDot); SetTarget(theTarget, TargetMode.MultiDot); }) ) ) )); }
public static Boolean ShouldMindSear(WoWUnit unit) { if (unit == null) { return(false); } if (Me.IsMoving) { return(false); } // Friendly target - in combat - mob count check. if (!AltarboySettings.Instance.UseMindSear) { return(false); } //Make sure nothing is cced. if (TargetManager.CrowdControllUnitInRange(unit, 10)) { return(false); } //Check targets against hash targets -dev// lets still make sure there are enough targets to justify searing in range (10yrds) if (TargetManager.IsMindSearTarget(unit) && TargetManager.NumOfHostileWithinRange(unit, 10) >= AltarboySettings.Instance.MindSearHostileCount) { return(true); } if (unit.IsFriendly && unit.Combat && TargetManager.NumOfHostileWithinRange(unit, 10) >= AltarboySettings.Instance.MindSearHostileCount) { return(true); } return(false); }