Пример #1
0
#pragma warning restore IDE0051

        public DruidFeralCat(WowInterface wowInterface, AmeisenBotStateMachine stateMachine) : base(wowInterface, stateMachine)
        {
            MyAuraManager.BuffsToKeepActive = new Dictionary <string, CastFunction>()
            {
                { markOfTheWildSpell, () => CastSpellIfPossible(markOfTheWildSpell, WowInterface.ObjectManager.PlayerGuid, true, 0, true) },
                { catFormSpell, () => CastSpellIfPossible(catFormSpell, 0, true) },
                { savageRoarSpell, () => CastSpellIfPossibleRogue(savageRoarSpell, WowInterface.ObjectManager.TargetGuid, true, true, 1) }
            };

            TargetAuraManager.DebuffsToKeepActive = new Dictionary <string, CastFunction>()
            {
                { ripSpell, () => WowInterface.ObjectManager.Player.ComboPoints == 5 && CastSpellIfPossibleRogue(ripSpell, WowInterface.ObjectManager.TargetGuid, true, true, 5) },
                { rakeSpell, () => CastSpellIfPossible(rakeSpell, WowInterface.ObjectManager.TargetGuid, true) },
                { mangleSpell, () => CastSpellIfPossible(mangleSpell, WowInterface.ObjectManager.TargetGuid, true) }
            };

            TargetInterruptManager.InterruptSpells = new SortedList <int, CastInterruptFunction>()
            {
                { 0, (x) => CastSpellIfPossible(faerieFireSpell, x.Guid, true) },
            };

            AutoAttackEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(4000));

            GroupAuraManager.SpellsToKeepActiveOnParty.Add((markOfTheWildSpell, (spellName, guid) => CastSpellIfPossible(spellName, guid, true)));
        }
Пример #2
0
        public QuestEngine(WowInterface wowInterface)
        {
            WowInterface = wowInterface;

            CompletedQuests           = new List <int>();
            QueryCompletedQuestsEvent = new TimegatedEvent(TimeSpan.FromSeconds(2));
        }
Пример #3
0
        public EyeOfTheStorm(WowInterface wowInterface)
        {
            WowInterface = wowInterface;

            CaptureFlagEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));
            CombatEvent      = new TimegatedEvent(TimeSpan.FromSeconds(2));
        }
Пример #4
0
        public PaladinProtection(WowInterface wowInterface) : base()
        {
            WowInterface = wowInterface;
            //Spell
            spellCoolDown.Add(avengersShieldSpell, DateTime.Now);
            spellCoolDown.Add(consecrationSpell, DateTime.Now);
            spellCoolDown.Add(judgementofLightSpell, DateTime.Now);
            spellCoolDown.Add(holyShieldSpell, DateTime.Now);
            spellCoolDown.Add(hammeroftheRighteousSpell, DateTime.Now);
            spellCoolDown.Add(hammerofWrathSpell, DateTime.Now);
            spellCoolDown.Add(exorcismSpell, DateTime.Now);
            spellCoolDown.Add(divineProtectionSpell, DateTime.Now);
            spellCoolDown.Add(handofReckoningSpell, DateTime.Now);
            spellCoolDown.Add(hammerofJusticeSpell, DateTime.Now);
            spellCoolDown.Add(layonHandsSpell, DateTime.Now);
            spellCoolDown.Add(holyLightSpell, DateTime.Now);
            spellCoolDown.Add(redemptionSpell, DateTime.Now);

            //Buff
            spellCoolDown.Add(blessingofKingsSpell, DateTime.Now);
            spellCoolDown.Add(sealofLightSpell, DateTime.Now);
            spellCoolDown.Add(devotionAuraSpell, DateTime.Now);
            spellCoolDown.Add(righteousFurySpell, DateTime.Now);

            //Time event
            revivePlayerEvent = new TimegatedEvent(TimeSpan.FromSeconds(4));
        }
Пример #5
0
        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));
        }
Пример #6
0
        public PriestHoly(WowInterface wowInterface) : base()
        {
            WowInterface = wowInterface;

            //Spells / dmg
            spellCoolDown.Add(SmiteSpell, DateTime.Now);
            spellCoolDown.Add(HolyFireSpell, DateTime.Now);

            //Spells
            spellCoolDown.Add(ResurrectionSpell, DateTime.Now);
            spellCoolDown.Add(RenewSpell, DateTime.Now);
            spellCoolDown.Add(FlashHealSpell, DateTime.Now);
            spellCoolDown.Add(GreaterHealSpell, DateTime.Now);
            spellCoolDown.Add(PowerWordShieldSpell, DateTime.Now);
            spellCoolDown.Add(CircleOfHealingSpell, DateTime.Now);
            spellCoolDown.Add(DesperatePrayerSpell, DateTime.Now);
            spellCoolDown.Add(FadeSpell, DateTime.Now);

            //Buffs
            spellCoolDown.Add(DivineSpiritSpell, DateTime.Now);
            spellCoolDown.Add(InnerFireSpell, DateTime.Now);
            spellCoolDown.Add(FearWardSpell, DateTime.Now);
            spellCoolDown.Add(PowerWordFortitudeSpell, DateTime.Now);
            spellCoolDown.Add(ShadowProtectionSpell, DateTime.Now);
            spellCoolDown.Add(PrayerofFortitude, DateTime.Now);
            spellCoolDown.Add(PrayerofShadowProtection, DateTime.Now);


            //Time event
            revivePlayerEvent = new TimegatedEvent(TimeSpan.FromSeconds(4));
        }
Пример #7
0
#pragma warning restore IDE0051

        public HunterMarksmanship(WowInterface wowInterface, AmeisenBotStateMachine stateMachine) : base(wowInterface, stateMachine)
        {
            PetManager = new PetManager(
                WowInterface.ObjectManager.Pet,
                TimeSpan.FromSeconds(15),
                () => CastSpellIfPossible(mendPetSpell, 0, true),
                () => CastSpellIfPossible(callPetSpell, 0),
                () => CastSpellIfPossible(revivePetSpell, 0));

            MyAuraManager.BuffsToKeepActive = new Dictionary <string, CastFunction>()
            {
                { aspectOfTheDragonhawkSpell, () => CastSpellIfPossible(aspectOfTheDragonhawkSpell, 0, true) }
            };

            TargetAuraManager.DebuffsToKeepActive = new Dictionary <string, CastFunction>()
            {
                { huntersMarkSpell, () => CastSpellIfPossible(huntersMarkSpell, WowInterface.ObjectManager.TargetGuid, true) },
                { serpentStingSpell, () => CastSpellIfPossible(serpentStingSpell, WowInterface.ObjectManager.TargetGuid, true) }
            };

            TargetInterruptManager.InterruptSpells = new SortedList <int, CastInterruptFunction>()
            {
                { 0, (x) => CastSpellIfPossible(silencingShotSpell, x.Guid, true) }
            };

            AutoAttackEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(4000));
        }
Пример #8
0
        public RuneforgingQuestObjective(WowInterface wowInterface, EnchantItemQuestObjectiveCondition condition)
        {
            WowInterface = wowInterface;
            Condition    = condition;

            EnchantEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));
        }
Пример #9
0
        public ArathiBasin(WowInterface wowInterface)
        {
            WowInterface = wowInterface;

            CaptureFlagEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));
            CombatEvent      = new TimegatedEvent(TimeSpan.FromSeconds(2));
            FlagsNodelist    = new List <Flags>();
        }
        public UseObjectQuestObjective(WowInterface wowInterface, List <int> objectDisplayIds, UseObjectQuestObjectiveCondition condition)
        {
            WowInterface     = wowInterface;
            ObjectDisplayIds = objectDisplayIds;
            Condition        = condition;

            UseEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));
        }
Пример #11
0
        public TargetManager(ITargetSelectionLogic targetSelectionLogic, TimeSpan minTargetSwitchTime)
        {
            TargetSelectionLogic = targetSelectionLogic;

            TargetSwitchEvent = new TimegatedEvent(minTargetSwitchTime);

            PriorityTargets = new List <string>();
        }
Пример #12
0
        public GrindingEngine(WowInterface wowInterface, AmeisenBotConfig config, AmeisenBotStateMachine stateMachine)
        {
            WowInterface = wowInterface;
            Config       = config;
            StateMachine = stateMachine;

            Blacklist        = new List <ulong>();
            TargetInLosEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(500));
        }
Пример #13
0
        public QuestEngine(WowInterface wowInterface, AmeisenBotConfig config, AmeisenBotStateMachine stateMachine)
        {
            WowInterface = wowInterface;
            Config       = config;
            StateMachine = stateMachine;

            CompletedQuests           = new List <int>();
            QueryCompletedQuestsEvent = new TimegatedEvent(TimeSpan.FromSeconds(2));
        }
Пример #14
0
        public TalkToUnitQuestObjective(WowInterface wowInterface, List <int> displayIds, List <int> gossipIds, TalkToUnitQuestObjectiveCondition condition)
        {
            WowInterface = wowInterface;
            DisplayIds   = displayIds;
            GossipIds    = gossipIds;
            Condition    = condition;

            TalkEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(500));
        }
 public CollectQuestObjective(WowInterface wowInterface, int itemId, int itemAmount, List <int> gameObjectIds, List <Vector3> positions)
 {
     WowInterface     = wowInterface;
     ItemId           = itemId;
     WantedItemAmount = itemAmount;
     GameObjectIds    = gameObjectIds;
     Area             = positions.Select(pos => new AreaNode(pos, 10.0)).ToList();
     RightClickEvent  = new TimegatedEvent(TimeSpan.FromMilliseconds(1500));
 }
Пример #16
0
        public TwilightPortalTactic(WowInterface wowInterface)
        {
            WowInterface     = wowInterface;
            PortalClickEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));

            Configureables = new Dictionary <string, dynamic>()
            {
                { "isOffTank", false },
            };
        }
Пример #17
0
        public PetManager(WowInterface wowInterface, TimeSpan healPetCooldown, CastMendPetFunction castMendPetFunction, CastCallPetFunction castCallPetFunction, CastRevivePetFunction castRevivePetFunction)
        {
            WowInterface    = wowInterface;
            HealPetCooldown = healPetCooldown;
            CastMendPet     = castMendPetFunction;
            CastCallPet     = castCallPetFunction;
            CastRevivePet   = castRevivePetFunction;

            CallPetEvent = new TimegatedEvent(TimeSpan.FromSeconds(8));
        }
        public CollectQuestObjectiveDEPRECATED(WowInterface wowInterface, int itemId, int itemAmount, int objectDisplayId, List <AreaNode> area)
        {
            WowInterface     = wowInterface;
            ItemId           = itemId;
            WantedItemAmount = itemAmount;
            ObjectDisplayId  = objectDisplayId;
            Area             = area;

            RightClickEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));
        }
Пример #19
0
        public DungeonEngine(WowInterface wowInterface)
        {
            WowInterface = wowInterface;

            CurrentNodes     = new Queue <DungeonNode>();
            ExitDungeonEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(1000));

            RootSelector = new Selector <DungeonBlackboard>
                           (
                "HasFinishedDungeon",
                (b) => Progress == 100.0,
                new Leaf <DungeonBlackboard>("LeaveDungeon", (b) => ExitDungeon()),
                new Selector <DungeonBlackboard>
                (
                    "IDied",
                    (b) => IDied,
                    new Sequence <DungeonBlackboard>
                    (
                        new Leaf <DungeonBlackboard>("RecoverDeathPosition", (b) => MoveToPosition(DeathPosition)),
                        new Leaf <DungeonBlackboard>("SetIDiedToFalse", (b) =>
            {
                IDied = false;
                return(BehaviorTreeStatus.Success);
            })
                    ),
                    new Selector <DungeonBlackboard>
                    (
                        "AmITheLeader",
                        (b) => WowInterface.ObjectManager.PartyleaderGuid == WowInterface.ObjectManager.PlayerGuid || !WowInterface.ObjectManager.PartymemberGuids.Any(),
                        new Selector <DungeonBlackboard>
                        (
                            "AreAllPlayersPresent",
                            (b) => AreAllPlayersPresent(48.0),
                            new Leaf <DungeonBlackboard>("FollowNodePath", (b) => FollowNodePath()),
                            new Leaf <DungeonBlackboard>("WaitForPlayersToArrive", (b) => { return(BehaviorTreeStatus.Success); })
                        ),
                        new Selector <DungeonBlackboard>
                        (
                            "IsDungeonLeaderInRange",
                            (b) => WowInterface.ObjectManager.Partyleader != null,
                            new Leaf <DungeonBlackboard>("FollowLeader", (b) => MoveToPosition(WowInterface.ObjectManager.Partyleader.Position, 0f, MovementAction.Following)),
                            new Leaf <DungeonBlackboard>("WaitForLeaderToArrive", (b) => { return(BehaviorTreeStatus.Success); })
                        )
                    )
                )
                           );

            BehaviorTree = new AmeisenBotBehaviorTree <DungeonBlackboard>
                           (
                "DungeonBehaviorTree",
                RootSelector,
                DungeonBlackboard
                           );
        }
Пример #20
0
        protected BasicKamelClass()
        {
            //Basic
            AutoAttackEvent   = new TimegatedEvent(TimeSpan.FromSeconds(1));
            TargetSelectEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));

            //Mount check
            getonthemount = new TimegatedEvent(TimeSpan.FromSeconds(4));

            PriorityTargetDisplayIds = new List <int>();
        }
Пример #21
0
        public StateIdle(AmeisenBotStateMachine stateMachine, AmeisenBotConfig config, WowInterface wowInterface) : base(stateMachine, config, wowInterface)
        {
            FirstStart = true;

            BagSlotCheckEvent         = new TimegatedEvent(TimeSpan.FromMilliseconds(5000));
            EatCheckEvent             = new TimegatedEvent(TimeSpan.FromMilliseconds(2000));
            LootCheckEvent            = new TimegatedEvent(TimeSpan.FromMilliseconds(2000));
            RepairCheckEvent          = new TimegatedEvent(TimeSpan.FromMilliseconds(5000));
            QuestgiverCheckEvent      = new TimegatedEvent(TimeSpan.FromMilliseconds(2000));
            QuestgiverRightClickEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(3000));
            RefreshCharacterEvent     = new TimegatedEvent(TimeSpan.FromMilliseconds(1000));
        }
Пример #22
0
        public DruidRestoration(AmeisenBotStateMachine stateMachine) : base(stateMachine)
        {
            MyAuraManager.BuffsToKeepActive = new Dictionary <string, CastFunction>()
            {
                { treeOfLifeSpell, () => WowInterface.ObjectManager.PartymemberGuids.Any() && TryCastSpell(treeOfLifeSpell, WowInterface.ObjectManager.PlayerGuid, true) },
                { markOfTheWildSpell, () => TryCastSpell(markOfTheWildSpell, WowInterface.ObjectManager.PlayerGuid, true) }
            };

            GroupAuraManager.SpellsToKeepActiveOnParty.Add((markOfTheWildSpell, (spellName, guid) => TryCastSpell(spellName, guid, true)));

            SwiftmendEvent = new TimegatedEvent(TimeSpan.FromSeconds(15));
        }
Пример #23
0
        public DungeonEngine(WowInterface wowInterface, AmeisenBotStateMachine stateMachine)
        {
            WowInterface = wowInterface;
            StateMachine = stateMachine;

            CurrentNodes   = new ConcurrentQueue <DungeonNode>();
            CompletedNodes = new List <DungeonNode>();

            ExitDungeonEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(1000));

            Reset();
        }
Пример #24
0
        public TalkToUnitQuestObjective(WowInterface wowInterface, int displayId, List <int> gossipIds, bool questgiversOnly, TalkToUnitQuestObjectiveCondition condition)
        {
            WowInterface = wowInterface;
            DisplayIds   = new List <int>()
            {
                displayId
            };
            GossipIds       = gossipIds;
            Condition       = condition;
            QuestgiversOnly = questgiversOnly;

            TalkEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(500));
        }
Пример #25
0
        public JobEngine(WowInterface wowInterface, AmeisenBotConfig config)
        {
            AmeisenLogger.I.Log("JobEngine", $"Initializing", LogLevel.Verbose);

            WowInterface = wowInterface;
            Config       = config;

            MiningEvent    = new TimegatedEvent(TimeSpan.FromSeconds(1));
            BlacklistEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));
            MailSentEvent  = new TimegatedEvent(TimeSpan.FromSeconds(3));

            NodeBlacklist = new List <ulong>();
        }
Пример #26
0
        public void TimegateTest()
        {
            int            counter = 0;
            TimegatedEvent eventA  = new TimegatedEvent(TimeSpan.FromMilliseconds(1), () => { ++counter; });

            for (int i = 0; i < 6; ++i)
            {
                eventA.Run();
                Thread.Sleep(1);
            }

            Assert.AreEqual(6, counter);
        }
Пример #27
0
        public AMovementEngine(AmeisenBotConfig config)
        {
            Config = config;

            FindPathEvent           = new TimegatedEvent(TimeSpan.FromMilliseconds(500));
            RefreshPathEvent        = new TimegatedEvent(TimeSpan.FromMilliseconds(500));
            DistanceMovedCheckEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(500));

            PathQueue         = new Queue <Vector3>();
            PlacesToAvoidList = new List <(Vector3 position, float radius, DateTime until)>();

            PlayerVehicle = new BasicVehicle();
        }
Пример #28
0
        public BotQuest(WowInterface wowInterface, int id, string name, int level, int gossipId, BotQuestGetPosition start, BotQuestGetPosition end, List <IQuestObjective> objectives)
        {
            WowInterface = wowInterface;

            Id             = id;
            Name           = name;
            Level          = level;
            GossipId       = gossipId;
            GetStartObject = start;
            GetEndObject   = end;
            Objectives     = objectives;

            ActionEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(250));
        }
Пример #29
0
        public MainWindow()
        {
            InitializeComponent();

            Config = LoadConfig();

            darkForegroundBrush = new SolidColorBrush((Color)FindResource("DarkForeground"));
            darkBackgroundBrush = new SolidColorBrush((Color)FindResource("DarkBackground"));
            textAccentBrush     = new SolidColorBrush((Color)FindResource("TextAccent"));

            LabelUpdateEvent  = new TimegatedEvent(TimeSpan.FromSeconds(1));
            NotificationEvent = new TimegatedEvent(TimeSpan.FromSeconds(1));

            RenderState = true;
        }
Пример #30
0
#pragma warning restore IDE0051

        public RogueAssassination(WowInterface wowInterface, AmeisenBotStateMachine stateMachine) : base(wowInterface, stateMachine)
        {
            MyAuraManager.BuffsToKeepActive = new Dictionary <string, CastFunction>()
            {
                { sliceAndDiceSpell, () => CastSpellIfPossibleRogue(sliceAndDiceSpell, 0, true, true, 1) },
                { coldBloodSpell, () => CastSpellIfPossibleRogue(coldBloodSpell, 0, true) }
            };

            TargetInterruptManager.InterruptSpells = new SortedList <int, CastInterruptFunction>()
            {
                { 0, (x) => CastSpellIfPossibleRogue(kickSpell, x.Guid, true) }
            };

            AutoAttackEvent = new TimegatedEvent(TimeSpan.FromMilliseconds(4000));
        }