protected Composite CreateCastPetActionOnLocation(string action, LocationRetrievalDelegate location, SimpleBoolReturnDelegate extra) { return(new Decorator( ret => extra(ret) && PetManager.CanCastPetAction(action), new Sequence( new Action(ret => PetManager.CastPetAction(action)), new Action(ret => LegacySpellManager.ClickRemoteLocation(location(ret)))))); }
protected Composite CreateCastPetActionOn(string action, UnitSelectionDelegate onUnit, SimpleBoolReturnDelegate extra) { return(new Decorator( ret => extra(ret) && PetManager.CanCastPetAction(action), new Action(ret => PetManager.CastPetAction(action, onUnit(ret))))); }