public static Composite BuffSelf(string buffName, SimpleBoolReturnDelegate extra) { return new Decorator( ret => extra(ret) && !Me.Auras.Values.Any(a => a.Spell.Name == buffName) && CastManager.CanCast(buffName, Me), new Action(delegate { CastManager.CastSpell(buffName, Me); }) ); }
public Composite CreateSpellBuff(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector, bool waitForDebuff) { // BUGFIX: HB currently doesn't check ActiveAuras in the spell manager. So this'll break on new spell procs return (new Sequence( CreateSpellCast( spellName, ret => extra(ret) && unitSelector(ret) != null && !HasAuraStacks(spellName, 0, unitSelector(ret)), unitSelector, false), new DecoratorContinue( ret => waitForDebuff, new Sequence( new WaitContinue(1, ret => Me.IsCasting, new ActionAlwaysSucceed()), new WaitContinue(3, ret => !Me.IsCasting && !StyxWoW.GlobalCooldown, new Action(ret => { StyxWoW.SleepForLagDuration(); Thread.Sleep(100); })))))); }
public Composite CreateSpellBuff(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector, bool waitForDebuff) { // BUGFIX: HB currently doesn't check ActiveAuras in the spell manager. So this'll break on new spell procs return new Sequence( CreateSpellCast( spellName, ret => extra(ret) && unitSelector(ret) != null && !HasAuraStacks(spellName, 0, unitSelector(ret)), unitSelector, false), new DecoratorContinue( ret => waitForDebuff, new Sequence( new WaitContinue(1, ret => Me.IsCasting, new ActionAlwaysSucceed()), new WaitContinue(3, ret => !Me.IsCasting && !StyxWoW.GlobalCooldown, new Action(ret => { StyxWoW.SleepForLagDuration(); Thread.Sleep(100); }))))); }
public Composite CreateSpellBuffOnSelf(int spellId, SimpleBoolReturnDelegate extra) { return(CreateSpellCast(spellId, extra, ret => Me)); }
public static Composite UseItemById(int itemId, SimpleBoolReturnDelegate extra) { return new PrioritySelector( new Decorator( ret => extra(ret), new Action(delegate{ CastManager.UseItemById(itemId); Logger.Log("Using " + CastManager.GetItemById(itemId) + ". Lusting? " + AuraManager.IsLusting(Me)); }) )); }
public Composite CreateSpellBuff(string spellName, SimpleBoolReturnDelegate extra, bool waitForDebuff) { return(CreateSpellBuff(spellName, extra, ret => Me.CurrentTarget, waitForDebuff)); }
public Composite CreateSpellBuff(int spellId, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector) { return(new Decorator( ret => extra(ret) && unitSelector(ret) != null && SpellManager.CanBuff(spellId, unitSelector(ret)), new Action(ret => CastWithLog(spellId, unitSelector(ret))))); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra) { return(CreateSpellCast(spellName, extra, true)); }
public Composite CreateSpellBuff(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector) { // BUGFIX: HB currently doesn't check ActiveAuras in the spell manager. So this'll break on new spell procs return(CreateSpellBuff(spellName, extra, unitSelector, false)); }
protected Composite CreateCastPetActionOnLocation(string action, SimpleBoolReturnDelegate extra) { return CreateCastPetActionOnLocation(action, ret => Me.CurrentTarget.Location, extra); }
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)))))); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra, bool checkMoving) { return CreateSpellCast(spellName, extra, ret => Me.CurrentTarget, checkMoving); }
public Composite CreateSpellBuff(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector) { // BUGFIX: HB currently doesn't check ActiveAuras in the spell manager. So this'll break on new spell procs return CreateSpellBuff(spellName, extra, unitSelector, false); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra) { return CreateSpellCast(spellName, extra, true); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector, bool checkMoving) { return new Decorator( ret => extra(ret) && unitSelector(ret) != null && CanCast(spellName, unitSelector(ret), checkMoving), new PrioritySelector( CreateApproachToCast(spellName, unitSelector), new Decorator( ret => !checkMoving && Me.IsMoving && SpellManager.Spells[spellName].CastTime > 0, new Sequence( new Action(ret => Navigator.PlayerMover.MoveStop()), new Action(ret => StyxWoW.SleepForLagDuration()))), // Just logs the spell, and calls SpellManager.Cast(name) - Simply for readability, and to make sure // manual spell logging is *all* the same. new Action(ret => CastWithLog(spellName, unitSelector(ret))))); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector) { return CreateSpellCast(spellName, extra, unitSelector, true); }
protected Composite CreateUseWand(SimpleBoolReturnDelegate extra) { return new PrioritySelector( new Decorator( ret => HasWand && !IsWanding && extra(ret), new Action(ret => SpellManager.Cast("Shoot"))) ); }
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 CreateCastPetActionOnLocation(string action, SimpleBoolReturnDelegate extra) { return(CreateCastPetActionOnLocation(action, ret => Me.CurrentTarget.Location, extra)); }
public Composite CreateSpellBuff(string spellName, SimpleBoolReturnDelegate extra, bool waitForDebuff) { return CreateSpellBuff(spellName, extra, ret => Me.CurrentTarget, waitForDebuff); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector) { return(CreateSpellCast(spellName, extra, unitSelector, true)); }
public Composite CreateSpellBuffOnSelf(string spellName, SimpleBoolReturnDelegate extra) { return CreateSpellBuff(spellName, extra, ret => Me); }
public Composite CreateSpellCast(string spellName, SimpleBoolReturnDelegate extra, bool checkMoving) { return(CreateSpellCast(spellName, extra, ret => Me.CurrentTarget, checkMoving)); }
public Composite CreateSpellBuff(int spellId, SimpleBoolReturnDelegate extra, UnitSelectionDelegate unitSelector) { return new Decorator( ret => extra(ret) && unitSelector(ret) != null && SpellManager.CanBuff(spellId, unitSelector(ret)), new Action(ret => CastWithLog(spellId, unitSelector(ret)))); }
public Composite CreateSpellBuff(int spellId, SimpleBoolReturnDelegate extra) { return CreateSpellCast(spellId, extra, ret => Me.CurrentTarget); }
public Composite CreateSpellBuffOnSelf(int spellId, SimpleBoolReturnDelegate extra) { return CreateSpellCast(spellId, extra, ret => Me); }
public Composite CreateSpellBuffOnSelf(string spellName, SimpleBoolReturnDelegate extra) { return(CreateSpellBuff(spellName, extra, ret => Me)); }
private static Composite NormalDpsRotation(SimpleBoolReturnDelegate extra) { // Altarboy.Logger.Slog(Color.Lime, "--- Single Target Max Dps Rotation --- "); return new Sequence( //this is the stationary composite, so it shouldn't be an issue to face the target. new TreeSharp.Action(delegate { if (!Me.IsMoving && !Me.IsSafelyFacing(TargetManager.ActiveTarget)) { TargetManager.ActiveTarget.Face(); } }), new Decorator( ret => extra(ret), new PrioritySelector( // This doesnt belong here but Im using it for raiding at the moment... will move later. AltarboyComposites.CastSpell("Dispersion", ret => (AuraManager.HasAuraStacks("Tormented", 14, Me)), Me), //Shadow Word Death On Exectue AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathForExecute && TargetManager.ActiveTarget.HealthPercent <= 25 ), TargetManager.ActiveTarget), //Shadowfiend on Bloodlust. AltarboyComposites.CastSpell("Shadowfiend", ret => ( AltarboySettings.Instance.ForceFiendOnBloodlust && AuraManager.IsLusting(Me)), TargetManager.ActiveTarget ), //Shadowfiend on Bloodlust. AltarboyComposites.CastSpell("Shadowfiend", ret => ( AltarboySettings.Instance.ForceShadowFiendOnArchangel && AuraManager.HasMyAura("Dark Archangel", Me)), TargetManager.ActiveTarget ), // I think it always makes sense to use pain first... this can generate orbs, and apparitions. AltarboyComposites.CastSpell("Shadow Word: Pain", ret => ( AuraManager.GetAuraTimeLeft("Shadow Word: Pain", TargetManager.ActiveTarget, true).TotalSeconds <= .4), TargetManager.ActiveTarget ), AltarboyComposites.CastSpell("Mind Flay", ret => ( !Altarboy.AuraManager.HasAuraStacks("Dark Evangelism", 5, Me) && Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration) ), TargetManager.ActiveTarget), // If there is an orb to use, and ES is close to running out... Refresh it before applying dots. AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && AuraManager.HasMyAura("Shadow Orb", Me, 1) && AuraManager.GetAuraTimeLeft("Empowered Shadow", Me, true).TotalSeconds < 4 , TargetManager.ActiveTarget ), AltarboyComposites.CastSpell("Vampiric Touch", ret => ( CastManager.LastSpellCast != "Vampiric Touch" && Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Vampiric Touch", TargetManager.ActiveTarget, true).TotalSeconds <= 2.6) ), TargetManager.ActiveTarget), // DP goes second cause you can cast while moving and it does instant damage. AltarboyComposites.CastSpell("Devouring Plague", ret => ( TargetManager.ShouldApplyDevouringPlague() ), TargetManager.ActiveTarget), // --- Trying to delay mana regen stuff untill dots are up if possible. ---// //Use dispersion when low on mana. AltarboyComposites.CastSpell("Dispersion", ret => (Me.ManaPercent <= AltarboySettings.Instance.DispersionManaPercent), Me), //Shadowfiend on CD or as mana regen. AltarboyComposites.CastSpell("Shadowfiend", ret => ( (AltarboySettings.Instance.UseShadowFiendOnCD || (AltarboySettings.Instance.UseShadowFiendForManaRegen && Me.ManaPercent <= AltarboySettings.Instance.UseShadowFiendManaPercent)) && AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= 0.5) , TargetManager.ActiveTarget ), //Only use Archangel when there are 5 stacks up. //TODO - Want to add logic to make sure this isn't cast when dots are close to needing a refresh // - the goal is to make sure that right after this we can maximize mindblasts and mindflays. AltarboyComposites.CastSpell("Archangel", ret => ( AuraManager.HasMyAura("Dark Evangelism", Me, 5) && AuraManager.GetAuraTimeLeft("Vampiric Touch", TargetManager.ActiveTarget, true).TotalSeconds > 8 && AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= 0.5) , Me ), //Shadow Word Death For Mana AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathForManaOnly && Me.ManaPercent <= AltarboySettings.Instance.ShadowWordDeathManaPercent ), TargetManager.ActiveTarget), //Shadow Word on CD (Not sure who would want this) AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathOnCD ), TargetManager.ActiveTarget), //Mind blast freely if we have at least ten seconds of ES left or if use wants to fire it on cooldown AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Empowered Shadow", Me, true).TotalSeconds > 9 || AltarboySettings.Instance.UseMindBlastOnCD) , TargetManager.ActiveTarget ), //Mind blast if we have at least 1 orb up and no ES at all. (Want to get ES up as fast as possible) AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && AuraManager.HasMyAura("Shadow Orb", Me, 1) , TargetManager.ActiveTarget), //Always use MB when you have 3 orbs AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.HasMyAura("Shadow Orb", Me, 3) ), TargetManager.ActiveTarget), //Mind flay when when you have nothing else to do.. Try and clip to account for lag. AltarboyComposites.CastSpell("Mind Flay", ret => ( Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration) ), TargetManager.ActiveTarget) ) ) ); }
public Composite CreateSpellBuff(int spellId, SimpleBoolReturnDelegate extra) { return(CreateSpellCast(spellId, extra, ret => Me.CurrentTarget)); }
private static Composite MindSearDps(SimpleBoolReturnDelegate extra) { //FOR NOW WE WILL ASSUME THAT WE ONLY MIND SEAR ON FRIENDLY TARGETS // EVENTUALLY THIS WONT BE THE CASE. return new Sequence( //this is the stationary composite, so it shouldn't be an issue to face the target. new TreeSharp.Action(delegate { if (!Me.IsMoving) { TargetManager.ActiveTarget.Face(); } }), new Decorator( ret => extra(ret) , new PrioritySelector( // lets trigger ES first if possible // AltarboyComposites.CastSpell("Mind Blast", ret => // Me.CurrentTarget.CurrentTarget != null && // Me.IsSafelyFacing(Me.CurrentTarget.CurrentTarget ) && // !Me.IsMoving && // AuraManager.HasMyAura("Shadow Orb", Me, 1) // , Me.CurrentTarget.CurrentTarget), // // Mind sear is expensive... lets get some mana back. //AltarboyComposites.CastSpell("Shadowfiend", ret => ( // Me.CurrentTarget.CurrentTarget != null && // (AltarboySettings.Instance.UseShadowFiendOnCD || (AltarboySettings.Instance.UseShadowFiendForManaRegen && Me.ManaPercent <= AltarboySettings.Instance.UseShadowFiendManaPercent)) && // AuraManager.GetAuraTimeLeft("Mind Sear", Me.CurrentTarget, true).TotalSeconds <= 0.5), // Me.CurrentTarget.CurrentTarget //), ////Lets Execute with SWD if we can. //AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( // SafeToShadowWordDeath() && // AltarboySettings.Instance.ShadowWordDeathForExecute && // TargetManager.DetectHostileTargets(40).Any(target => (target.HealthPercent <= 25 && target.Distance <= 35)) // ), TargetManager.DetectHostileTargets(40).First(target => (target.HealthPercent <= 25 && target.Distance <= 35))), //// lets use some SWD if possible... good time to get some mana back //AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( // SafeToShadowWordDeath() && // Me.ManaPercent <= AltarboySettings.Instance.ShadowWordDeathManaPercent && // AltarboySettings.Instance.ShadowWordDeathForManaOnly //), false, Me.CurrentTarget.CurrentTarget), AltarboyComposites.CastMindSear(ret => (AuraManager.GetAuraTimeLeft("Mind Sear", TargetManager.ActiveTarget, true).TotalSeconds <= 0.4)) ) // new TreeSharp.Action(delegate { CastManager.CastSpell("Mind Sear"); }) )); }
public static Composite CastMindSear(SimpleBoolReturnDelegate extra) { //Todo - Should add logic to check for CC'ed targets within Mindsear Range. return new Decorator( ret => extra(ret), new Sequence( //new Action(ret => Navigator.PlayerMover.MoveStop()), | Beyond annoying. new Action(ret => TargetManager.ActiveTarget .Face()), new Action(ret => CastManager.CastSpell("Mind Sear", TargetManager.ActiveTarget)) ) ); }
private static Composite NormalDpsRotation(SimpleBoolReturnDelegate extra) { // Altarboy.Logger.Slog(Color.Lime, "--- Single Target Max Dps Rotation --- "); return(new Sequence( //this is the stationary composite, so it shouldn't be an issue to face the target. new TreeSharp.Action(delegate { if (!Me.IsMoving && !Me.IsSafelyFacing(TargetManager.ActiveTarget)) { TargetManager.ActiveTarget.Face(); } }), new Decorator( ret => extra(ret), new PrioritySelector( // This doesnt belong here but Im using it for raiding at the moment... will move later. AltarboyComposites.CastSpell("Dispersion", ret => (AuraManager.HasAuraStacks("Tormented", 14, Me)), Me), //Shadow Word Death On Exectue AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathForExecute && TargetManager.ActiveTarget.HealthPercent <= 25 ), TargetManager.ActiveTarget), //Shadowfiend on Bloodlust. AltarboyComposites.CastSpell("Shadowfiend", ret => ( AltarboySettings.Instance.ForceFiendOnBloodlust && AuraManager.IsLusting(Me)), TargetManager.ActiveTarget ), //Shadowfiend on Bloodlust. AltarboyComposites.CastSpell("Shadowfiend", ret => ( AltarboySettings.Instance.ForceShadowFiendOnArchangel && AuraManager.HasMyAura("Dark Archangel", Me)), TargetManager.ActiveTarget ), // I think it always makes sense to use pain first... this can generate orbs, and apparitions. AltarboyComposites.CastSpell("Shadow Word: Pain", ret => ( AuraManager.GetAuraTimeLeft("Shadow Word: Pain", TargetManager.ActiveTarget, true).TotalSeconds <= .4), TargetManager.ActiveTarget ), AltarboyComposites.CastSpell("Mind Flay", ret => ( !Altarboy.AuraManager.HasAuraStacks("Dark Evangelism", 5, Me) && Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration) ), TargetManager.ActiveTarget), // If there is an orb to use, and ES is close to running out... Refresh it before applying dots. AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && AuraManager.HasMyAura("Shadow Orb", Me, 1) && AuraManager.GetAuraTimeLeft("Empowered Shadow", Me, true).TotalSeconds < 4, TargetManager.ActiveTarget ), AltarboyComposites.CastSpell("Vampiric Touch", ret => ( CastManager.LastSpellCast != "Vampiric Touch" && Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Vampiric Touch", TargetManager.ActiveTarget, true).TotalSeconds <= 2.6) ), TargetManager.ActiveTarget), // DP goes second cause you can cast while moving and it does instant damage. AltarboyComposites.CastSpell("Devouring Plague", ret => ( TargetManager.ShouldApplyDevouringPlague() ), TargetManager.ActiveTarget), // --- Trying to delay mana regen stuff untill dots are up if possible. ---// //Use dispersion when low on mana. AltarboyComposites.CastSpell("Dispersion", ret => (Me.ManaPercent <= AltarboySettings.Instance.DispersionManaPercent), Me), //Shadowfiend on CD or as mana regen. AltarboyComposites.CastSpell("Shadowfiend", ret => ( (AltarboySettings.Instance.UseShadowFiendOnCD || (AltarboySettings.Instance.UseShadowFiendForManaRegen && Me.ManaPercent <= AltarboySettings.Instance.UseShadowFiendManaPercent)) && AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= 0.5) , TargetManager.ActiveTarget ), //Only use Archangel when there are 5 stacks up. //TODO - Want to add logic to make sure this isn't cast when dots are close to needing a refresh // - the goal is to make sure that right after this we can maximize mindblasts and mindflays. AltarboyComposites.CastSpell("Archangel", ret => ( AuraManager.HasMyAura("Dark Evangelism", Me, 5) && AuraManager.GetAuraTimeLeft("Vampiric Touch", TargetManager.ActiveTarget, true).TotalSeconds > 8 && AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= 0.5) , Me ), //Shadow Word Death For Mana AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathForManaOnly && Me.ManaPercent <= AltarboySettings.Instance.ShadowWordDeathManaPercent ), TargetManager.ActiveTarget), //Shadow Word on CD (Not sure who would want this) AltarboyComposites.CastSpell("Shadow Word: Death", ret => ( TargetManager.SafeToShadowWordDeath(TargetManager.ActiveTarget) && AltarboySettings.Instance.ShadowWordDeathOnCD ), TargetManager.ActiveTarget), //Mind blast freely if we have at least ten seconds of ES left or if use wants to fire it on cooldown AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Empowered Shadow", Me, true).TotalSeconds > 9 || AltarboySettings.Instance.UseMindBlastOnCD) , TargetManager.ActiveTarget ), //Mind blast if we have at least 1 orb up and no ES at all. (Want to get ES up as fast as possible) AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && AuraManager.HasMyAura("Shadow Orb", Me, 1) , TargetManager.ActiveTarget), //Always use MB when you have 3 orbs AltarboyComposites.CastSpell("Mind Blast", ret => Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.HasMyAura("Shadow Orb", Me, 3) ), TargetManager.ActiveTarget), //Mind flay when when you have nothing else to do.. Try and clip to account for lag. AltarboyComposites.CastSpell("Mind Flay", ret => ( Me.IsSafelyFacing(TargetManager.ActiveTarget) && (AuraManager.GetAuraTimeLeft("Mind Flay", TargetManager.ActiveTarget, true).TotalSeconds <= AltarboySettings.Instance.ClippingDuration) ), TargetManager.ActiveTarget) ) ) )); }
public static Composite UseSlottedItem(SimpleBoolReturnDelegate extra, WoWItem slottedItem ) { return new Decorator( ret => extra(ret) && ( slottedItem != null && slottedItem.BaseAddress != 0 && slottedItem.Cooldown == 0 ), new Action(delegate{ slottedItem.Use(); Logger.CastLog(slottedItem.Name, Me.Name); } ) ); }
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))))); }
public static Composite CastHeal(string spellName, SimpleBoolReturnDelegate extra, WoWUnit target) { //using current target no matter what... just testing something return new Decorator( ret => extra(ret) && CastManager.CanCast(spellName, target), new Action(delegate { CastManager.CastSpell(spellName, target); }) ); }
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)))); }