protected BasicCombatClass(WowInterface wowInterface, AmeisenBotFsm stateMachine) { WowInterface = wowInterface; StateMachine = stateMachine; C = new Dictionary <string, dynamic>() { { "HealingItemHealthThreshold", 30.0 }, { "HealingItemManaThreshold", 30.0 } }; CooldownManager = new CooldownManager(WowInterface.CharacterManager.SpellBook.Spells); RessurrectionTargets = new Dictionary <string, DateTime>(); TargetManagerDps = new TargetManager(new DpsTargetSelectionLogic(wowInterface), TimeSpan.FromMilliseconds(250)); TargetManagerTank = new TargetManager(new TankTargetSelectionLogic(wowInterface), TimeSpan.FromMilliseconds(250)); TargetManagerHeal = new TargetManager(new HealTargetSelectionLogic(wowInterface), TimeSpan.FromMilliseconds(250)); MyAuraManager = new AuraManager(wowInterface); TargetAuraManager = new AuraManager(wowInterface); GroupAuraManager = new GroupAuraManager(wowInterface); TargetInterruptManager = new InterruptManager(); EventCheckFacing = new(TimeSpan.FromMilliseconds(500)); EventAutoAttack = new(TimeSpan.FromMilliseconds(500)); }
protected BasicCombatClass(AmeisenBotStateMachine stateMachine) { WowInterface = WowInterface.I; StateMachine = stateMachine; Configureables = new Dictionary <string, dynamic>() { { "HealingItemHealthThreshold", 30.0 }, { "HealingItemManaThreshold", 30.0 } }; CooldownManager = new CooldownManager(WowInterface.CharacterManager.SpellBook.Spells); RessurrectionTargets = new Dictionary <string, DateTime>(); TargetManagerDps = new TargetManager(new DpsTargetSelectionLogic(), TimeSpan.FromMilliseconds(250)); TargetManagerTank = new TargetManager(new TankTargetSelectionLogic(), TimeSpan.FromMilliseconds(250)); TargetManagerHeal = new TargetManager(new HealTargetSelectionLogic(), TimeSpan.FromMilliseconds(250)); MyAuraManager = new AuraManager(() => WowInterface.ObjectManager.Player?.Auras); TargetAuraManager = new AuraManager(() => WowInterface.ObjectManager.Target?.Auras); GroupAuraManager = new GroupAuraManager(WowInterface); TargetInterruptManager = new InterruptManager(new List <WowUnit>() { WowInterface.ObjectManager.Target }, null); EventCheckFacing = new TimegatedEvent(TimeSpan.FromMilliseconds(500)); EventAutoAttack = new TimegatedEvent(TimeSpan.FromMilliseconds(500)); }
public override void OutOfCombatExecute() { if (MyAuraManager.Tick() || GroupAuraManager.Tick()) { return; } }
public override void OutOfCombatExecute() { if (MyAuraManager.Tick() || GroupAuraManager.Tick() || NeedToHealSomeone() || (DateTime.Now - LastDeadPartymembersCheck > TimeSpan.FromSeconds(deadPartymembersCheckTime) && HandleDeadPartymembers(resurrectionSpell))) { return; } }
protected BasicCombatClassBia10(AmeisenBotInterfaces bot) { Bot = bot; SpellAbortFunctions = new List <Func <bool> >(); ResurrectionTargets = new Dictionary <string, DateTime>(); CooldownManager = new CooldownManager(Bot.Character.SpellBook.Spells); InterruptManager = new InterruptManager(); MyAuraManager = new AuraManager(Bot); TargetAuraManager = new AuraManager(Bot); GroupAuraManager = new GroupAuraManager(Bot); EventCheckFacing = new TimegatedEvent(TimeSpan.FromMilliseconds(500)); Configureables = new Dictionary <string, dynamic> { { "HealthItemThreshold", 30.0 }, { "ManaItemThreshold", 30.0 } }; }
protected BasicCombatClass(WowInterface wowInterface, AmeisenBotStateMachine stateMachine) { WowInterface = wowInterface; StateMachine = stateMachine; CooldownManager = new CooldownManager(WowInterface.CharacterManager.SpellBook.Spells); RessurrectionTargets = new Dictionary <string, DateTime>(); ITargetSelectionLogic targetSelectionLogic = Role switch { CombatClassRole.Dps => targetSelectionLogic = new DpsTargetSelectionLogic(wowInterface), CombatClassRole.Heal => targetSelectionLogic = new HealTargetSelectionLogic(wowInterface), CombatClassRole.Tank => targetSelectionLogic = new TankTargetSelectionLogic(wowInterface), _ => null, }; TargetManager = new TargetManager(targetSelectionLogic, TimeSpan.FromMilliseconds(250)); Spells = new Dictionary <string, Spell>(); WowInterface.CharacterManager.SpellBook.OnSpellBookUpdate += () => { Spells.Clear(); foreach (Spell spell in WowInterface.CharacterManager.SpellBook.Spells.OrderBy(e => e.Rank).GroupBy(e => e.Name).Select(e => e.First())) { if (!Spells.ContainsKey(spell.Name)) { Spells.Add(spell.Name, spell); } } }; MyAuraManager = new AuraManager ( null, null, TimeSpan.FromSeconds(1), () => { if (WowInterface.ObjectManager.Player != null) { return(WowInterface.ObjectManager.Player.Auras.Select(e => e.Name).ToList()); } else { return(null); } }, () => { if (WowInterface.ObjectManager.Player != null) { return(WowInterface.ObjectManager.Player.Auras.Select(e => e.Name).ToList()); } else { return(null); } }, null, DispellDebuffsFunction ); TargetAuraManager = new AuraManager ( null, null, TimeSpan.FromSeconds(1), () => { if (WowInterface.ObjectManager.Target != null) { return(WowInterface.ObjectManager.Target.Auras.Select(e => e.Name).ToList()); } else { return(null); } }, () => { if (WowInterface.ObjectManager.Target != null) { return(WowInterface.ObjectManager.Target.Auras.Select(e => e.Name).ToList()); } else { return(null); } }, DispellBuffsFunction, null ); GroupAuraManager = new GroupAuraManager(WowInterface); TargetInterruptManager = new InterruptManager(new List <WowUnit>() { WowInterface.ObjectManager.Target }, null); ActionEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(50)); NearInterruptUnitsEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(250)); UpdatePriorityUnits = new TimegatedEvent(TimeSpan.FromMilliseconds(1000)); WalkBehindEnemy = false; }