/// <summary> /// Blows your wad all over the floor, copied from Singular /// </summary> /// <returns>Nothing but win</returns> public static Composite UseTrinkets() { if (CLUSettings.Instance.Trinket1Usage == TrinketUsage.Never && CLUSettings.Instance.Trinket2Usage == TrinketUsage.Never) { return(new Action(ret => { return RunStatus.Failure; })); } PrioritySelector ps = new PrioritySelector(); if (CLUSettings.IsTrinketUsageWanted(TrinketUsage.OnCooldown)) { ps.AddChild(Item.UseEquippedTrinket(TrinketUsage.OnCooldown)); } if (CLUSettings.IsTrinketUsageWanted(TrinketUsage.OnCooldownInCombat)) { ps.AddChild(Item.UseEquippedTrinket(TrinketUsage.OnCooldownInCombat)); } if (CLUSettings.IsTrinketUsageWanted(TrinketUsage.LowHealth)) { ps.AddChild(new Decorator(ret => StyxWoW.Me.HealthPercent < CLUSettings.Instance.MinHealth, Item.UseEquippedTrinket(TrinketUsage.LowHealth))); } if (CLUSettings.IsTrinketUsageWanted(TrinketUsage.LowPower)) { ps.AddChild(new Decorator(ret => StyxWoW.Me.PowerPercent < CLUSettings.Instance.MinMana, Item.UseEquippedTrinket(TrinketUsage.LowPower))); } if (CLUSettings.IsTrinketUsageWanted(TrinketUsage.CrowdControlled)) { ps.AddChild(new Decorator(ret => Unit.UnitIsControlled(Me, false), Item.UseEquippedTrinket(TrinketUsage.CrowdControlled))); } if (CLUSettings.IsTrinketUsageWanted(TrinketUsage.CrowdControlledSilenced)) { ps.AddChild(new Decorator(ret => StyxWoW.Me.Silenced && Unit.UnitIsControlled(Me, false), Item.UseEquippedTrinket(TrinketUsage.CrowdControlledSilenced))); } return(ps); //return UseEquippedTrinket(); }
private void ConfigurationForm_Load(object sender, EventArgs e) { lblVersion.Text = string.Format("Version: {0}", CLU.Version); // setup the bindings pgGeneral.SelectedObject = CLUSettings.Instance; CLUSettings main = CLUSettings.Instance; Styx.Helpers.Settings toSelect = null; switch (StyxWoW.Me.Class) { case WoWClass.Warrior: toSelect = main.Warrior; break; case WoWClass.Paladin: toSelect = main.Paladin; break; case WoWClass.Hunter: toSelect = main.Hunter; break; case WoWClass.Rogue: toSelect = main.Rogue; break; case WoWClass.Priest: toSelect = main.Priest; break; case WoWClass.DeathKnight: toSelect = main.DeathKnight; break; case WoWClass.Shaman: toSelect = main.Shaman; break; case WoWClass.Mage: toSelect = main.Mage; break; case WoWClass.Warlock: toSelect = main.Warlock; break; case WoWClass.Druid: toSelect = main.Druid; break; case WoWClass.Monk: toSelect = main.Monk; break; default: break; } if (toSelect != null) { pgClass.SelectedObject = toSelect; } // Initialize shit this.InitializeHealingGrid(); this.InitializeStyle(); }