public static Composite WaitForGcdOrCastOrChannel(FaceDuring faceDuring = FaceDuring.No, LagTolerance allow = LagTolerance.Yes) { return new PrioritySelector( WaitForGlobalCooldown(faceDuring,allow), WaitForCast(faceDuring, allow), WaitForChannel(faceDuring, allow) ); }
/// <summary> /// Creates a composite that will return a success, so long as you are currently casting. (Use this to prevent the CC from /// going down to lower branches in the tree, while casting.) /// </summary> /// <remarks> /// Created 13/5/2011. /// </remarks> /// <param name = "faceDuring">Whether or not to face during casting</param> /// <param name = "allow">Whether or not to allow lag tollerance for spell queueing</param> /// <returns></returns> public static Composite WaitForChannel(FaceDuring faceDuring = FaceDuring.No, LagTolerance allow = LagTolerance.Yes) { return new PrioritySelector( new Decorator( ret => faceDuring == FaceDuring.Yes, Movement.CreateFaceTargetBehavior() ), new Action(ret => { if (IsChannelling(allow)) return RunStatus.Success; return RunStatus.Failure; }) ); }