using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using Clio.Utilities; using Clio.XmlEngine; using ff14bot.Behavior; using ff14bot.Helpers; using ff14bot.Managers; using ff14bot.Navigation; using TreeSharp; using Action = TreeSharp.Action; namespace ff14bot.NeoProfiles { [XmlElement("Dismount")] public class DismountTag : ProfileBehavior { private bool _done; public override bool IsDone { get { return _done; } } protected override Composite CreateBehavior() { return new PrioritySelector( new Decorator(ret => Core.Player.IsMounted, CommonBehaviors.Dismount() ), new Decorator(ret => !Core.Player.IsMounted, new Action(r => { _done = true; }) ) ); } /// /// This gets called when a while loop starts over so reset anything that is used inside the IsDone check /// protected override void OnResetCachedDone() { _done = false; } protected override void OnDone() { } } }