Esempio n. 1
0
 public HookManager(XMemory xMemory, IOffsetList offsetList, ObjectManager objectManager, IAmeisenBotCache botCache)
 {
     XMemory       = xMemory;
     OffsetList    = offsetList;
     ObjectManager = objectManager;
     BotCache      = botCache;
 }
Esempio n. 2
0
        public AmeisenBotStateMachine(
            string botDataPath,
            Process wowProcess,
            AmeisenBotConfig config,
            XMemory xMemory,
            IOffsetList offsetList,
            ObjectManager objectManager,
            CharacterManager characterManager,
            HookManager hookManager,
            EventHookManager eventHookManager,
            IAmeisenBotCache botCache,
            IPathfindingHandler pathfindingHandler,
            IMovementEngine movementEngine,
            ICombatClass combatClass)
        {
            AmeisenLogger.Instance.Log("Starting AmeisenBotStateMachine...", LogLevel.Verbose);

            BotDataPath      = botDataPath;
            Config           = config;
            XMemory          = xMemory;
            OffsetList       = offsetList;
            ObjectManager    = objectManager;
            CharacterManager = characterManager;
            HookManager      = hookManager;
            EventHookManager = eventHookManager;
            BotCache         = botCache;

            LastObjectUpdate = DateTime.Now;
            LastGhostCheck   = DateTime.Now;
            LastEventPull    = DateTime.Now;

            LastState    = AmeisenBotState.None;
            UnitLootList = new Queue <ulong>();

            States = new Dictionary <AmeisenBotState, State>()
            {
                { AmeisenBotState.None, new StateNone(this, config) },
                { AmeisenBotState.StartWow, new StateStartWow(this, config, wowProcess, xMemory) },
                { AmeisenBotState.Login, new StateLogin(this, config, offsetList, characterManager) },
                { AmeisenBotState.LoadingScreen, new StateLoadingScreen(this, xMemory, config, objectManager) },
                { AmeisenBotState.Idle, new StateIdle(this, config, offsetList, objectManager, characterManager, hookManager, eventHookManager, combatClass, UnitLootList) },
                { AmeisenBotState.Dead, new StateDead(this, config, objectManager, hookManager) },
                { AmeisenBotState.Ghost, new StateGhost(this, config, offsetList, objectManager, characterManager, hookManager, pathfindingHandler, movementEngine) },
                { AmeisenBotState.Following, new StateFollowing(this, config, objectManager, characterManager, pathfindingHandler, movementEngine) },
                { AmeisenBotState.Attacking, new StateAttacking(this, config, objectManager, characterManager, hookManager, pathfindingHandler, movementEngine, combatClass) },
                { AmeisenBotState.Repairing, new StateRepairing(this, config, objectManager, hookManager, characterManager, pathfindingHandler, movementEngine) },
                { AmeisenBotState.Selling, new StateSelling(this, config, objectManager, hookManager, characterManager, pathfindingHandler, movementEngine) },
                { AmeisenBotState.Healing, new StateEating(this, config, objectManager, characterManager) },
                { AmeisenBotState.InsideAoeDamage, new StateInsideAoeDamage(this, config, objectManager, characterManager, pathfindingHandler, movementEngine) },
                { AmeisenBotState.Looting, new StateLooting(this, config, offsetList, objectManager, characterManager, hookManager, pathfindingHandler, movementEngine, UnitLootList) }
            };

            CurrentState = States.First();
            CurrentState.Value.Enter();
        }
Esempio n. 3
0
        public ObjectManager(XMemory xMemory, IOffsetList offsetList, IAmeisenBotCache botCache)
        {
            IsWorldLoaded = true;

            WowObjects = new List <WowObject>();
            XMemory    = xMemory;
            OffsetList = offsetList;
            BotCache   = botCache;

            EnableClickToMove();
        }