private Composite SetFatePoi() { return(new HookExecutor( "FatePoi", "A hook location that executes fate logic.", new Decorator(obj => Poi.Current.Type == PoiType.Fate, new PrioritySelector(new Decorator( obj => { if (FateData != null && !FateData.IsValid) { return true; } return FateData == null; }, new Action(obj => Poi.Clear("Fate is no longer valid"))), new Decorator(obj => !Core.Player.IsMounted && !this.Withinfate, CommonBehaviors.CreateMountBehavior()), new Decorator( obj => { if (!Core.Player.IsMounted) { return true; } return this.Withinfate; }, new HookExecutor("SetCombatPoi")), CommonBehaviors.MoveAndStop( obj => FateData.Location, obj => FateData.Radius / 2f, true, "Moving to fate"))))); }
private Composite SetRestPoi() { return(new HookExecutor( "RestPoi", "A hook location that executes downtime logic.", new Decorator(obj => Poi.Current.Type == PoiType.Wait, new PrioritySelector(new Decorator( obj => { if (FateData == null) { return true; } return !FateData.IsValid; }, new ActionRunCoroutine(obj => ResolveFate())), new Decorator( obj => FateData != null, new Action(obj => Poi.Clear("Time for resting is over!"))), new Decorator( obj => { if (!Core.Player.IsMounted) { return true; } return Poi.Current.Location.Distance(Core.Player.Location) <= 25f; }, new HookExecutor("SetCombatPoi")), new Decorator( obj => Poi.Current.Location.Distance(Core.Player.Location) > 15f, CommonBehaviors.CreateMountBehavior()), new Decorator( obj => Poi.Current.Location != Vector3.Zero, new Action(obj => Navigator.MoveToPointWithin(Poi.Current.Location, 15f, "Moving to rest location"))))))); }
public Composite MoveTo(Vector3 location, float distance) { return(new PrioritySelector(CommonBehaviors.CreateMountBehavior(), CommonBehaviors.CreateSprintBehavior(), new ActionRunCoroutine(i => MoveToTask(PartyManager.PartyLeader.BattleCharacter, 3f)))); //return new ActionRunCoroutine((i) => MoveToTask(GetTargetLocation(), 9f)); }