public DruidRestoration(AmeisenBotInterfaces bot) : base(bot) { MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Druid335a.TreeOfLife, () => Bot.Objects.PartymemberGuids.Any() && TryCastSpell(Druid335a.TreeOfLife, Bot.Wow.PlayerGuid, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Druid335a.MarkOfTheWild, () => TryCastSpell(Druid335a.MarkOfTheWild, Bot.Wow.PlayerGuid, true))); GroupAuraManager.SpellsToKeepActiveOnParty.Add((Druid335a.MarkOfTheWild, (spellName, guid) => TryCastSpell(spellName, guid, true))); HealingManager = new(bot, (string spellName, ulong guid) => { return(TryCastSpell(spellName, guid)); }); // make sure all new spells get added to the healing manager Bot.Character.SpellBook.OnSpellBookUpdate += () => { if (Bot.Character.SpellBook.TryGetSpellByName(Druid335a.Nourish, out Spell spellNourish)) { HealingManager.AddSpell(spellNourish); } if (Bot.Character.SpellBook.TryGetSpellByName(Druid335a.HealingTouch, out Spell spellHealingTouch)) { HealingManager.AddSpell(spellHealingTouch); } if (Bot.Character.SpellBook.TryGetSpellByName(Druid335a.Regrowth, out Spell spellRegrowth)) { HealingManager.AddSpell(spellRegrowth); } }; SpellAbortFunctions.Add(HealingManager.ShouldAbortCasting); SwiftmendEvent = new(TimeSpan.FromSeconds(15)); }
public PaladinHoly(AmeisenBotInterfaces bot) : base(bot) { Configurables.TryAdd("AttackInGroups", true); Configurables.TryAdd("AttackInGroupsUntilManaPercent", 85.0); Configurables.TryAdd("AttackInGroupsCloseCombat", false); Configurables.TryAdd("BeaconOfLightSelfHealth", 85.0); Configurables.TryAdd("BeaconOfLightPartyHealth", 85.0); Configurables.TryAdd("DivinePleaMana", 60.0); Configurables.TryAdd("DivineIlluminationManaAbove", 20.0); Configurables.TryAdd("DivineIlluminationManaUntil", 50.0); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Paladin335a.BlessingOfWisdom, () => TryCastSpell(Paladin335a.BlessingOfWisdom, Bot.Wow.PlayerGuid, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Paladin335a.DevotionAura, () => TryCastSpell(Paladin335a.DevotionAura, Bot.Wow.PlayerGuid, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Paladin335a.SealOfWisdom, () => Bot.Character.SpellBook.IsSpellKnown(Paladin335a.SealOfWisdom) && TryCastSpell(Paladin335a.SealOfWisdom, Bot.Wow.PlayerGuid, true))); MyAuraManager.Jobs.Add(new KeepActiveAuraJob(bot.Db, Paladin335a.SealOfVengeance, () => !Bot.Character.SpellBook.IsSpellKnown(Paladin335a.SealOfWisdom) && TryCastSpell(Paladin335a.SealOfVengeance, Bot.Wow.PlayerGuid, true))); GroupAuraManager.SpellsToKeepActiveOnParty.Add((Paladin335a.BlessingOfWisdom, (spellName, guid) => TryCastSpell(spellName, guid, true))); HealingManager = new(bot, (string spellName, ulong guid) => { return(TryCastSpell(spellName, guid)); }); // make sure all new spells get added to the healing manager Bot.Character.SpellBook.OnSpellBookUpdate += () => { if (Bot.Character.SpellBook.TryGetSpellByName(Paladin335a.FlashOfLight, out Spell spellFlashOfLight)) { HealingManager.AddSpell(spellFlashOfLight); } if (Bot.Character.SpellBook.TryGetSpellByName(Paladin335a.HolyLight, out Spell spellHolyLight)) { HealingManager.AddSpell(spellHolyLight); } if (Bot.Character.SpellBook.TryGetSpellByName(Paladin335a.HolyShock, out Spell spellHolyShock)) { HealingManager.AddSpell(spellHolyShock); } if (Bot.Character.SpellBook.TryGetSpellByName(Paladin335a.LayOnHands, out Spell spellLayOnHands)) { HealingManager.AddSpell(spellLayOnHands); } }; SpellAbortFunctions.Add(HealingManager.ShouldAbortCasting); ChangeBeaconEvent = new(TimeSpan.FromSeconds(1)); }