Example #1
0
        public Manager(IManagerEventHandler managerEventHandler, IProgress <string> progressHandle)
        {
            m_managerEventHandler = managerEventHandler;

            m_eyes  = new Eyes();
            m_hands = new Hands();
            m_ears  = new Ears();
            m_mouth = new Mouth(progressHandle);
            m_legs  = new Legs();

            m_fishingState  = FishingState.Stopped;
            m_neededActions = NeededAction.None;

            m_fishingStats = new FishingStats();
            m_fishingStats.Reset();

            _cancellationTokenSource = null;

            InitializeTimer(ref m_LureTimer, LureTimerTick);
            InitializeTimer(ref m_CharmTimer, CharmTimerTick);
            InitializeTimer(ref m_RaftTimer, RaftTimerTick);
            InitializeTimer(ref m_BaitTimer, BaitTimerTick);
            InitializeTimer(ref m_HearthStoneTimer, HearthStoneTimerTick);
            InitializeTimer(ref m_AntiAfkTimer, AntiAfkTimerTick);

            ResetTimers();
        }
Example #2
0
        public Manager(IManagerEventHandler managerEventHandler, IProgress <string> progressHandle)
        {
            _mManagerEventHandler = managerEventHandler;
            var wowWindowPointer = Win32.FindWowWindow();

            while (wowWindowPointer == new IntPtr())
            {
                var result = MessageBox.Show(
                    @"Could not find the the WoW process. Please make sure the game is running.",
                    @"Error - WoW not open", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                if (result == DialogResult.Cancel)
                {
                    Environment.Exit(1);
                }
                wowWindowPointer = Win32.FindWowWindow();
            }
            _eyes  = new Eyes(wowWindowPointer);
            _hands = new Hands(wowWindowPointer);
            _ears  = new Ears();
            _mouth = new Mouth(progressHandle);
            _legs  = new Legs();

            _fishingState  = FishingState.Stopped;
            _neededActions = NeededAction.None;

            _fishingStats = new FishingStats();
            _fishingStats.Reset();

            _cancellationTokenSource = null;

            _lureTimer        = InitializeTimer(LureTimerTick);
            _charmTimer       = InitializeTimer(CharmTimerTick);
            _raftTimer        = InitializeTimer(RaftTimerTick);
            _baitTimer        = InitializeTimer(BaitTimerTick);
            _hearthStoneTimer = InitializeTimer(HearthStoneTimerTick);
            _antiAfkTimer     = InitializeTimer(AntiAfkTimerTick);

            ResetTimers();
        }
Example #3
0
        public Manager(IManagerEventHandler managerEventHandler, IProgress <string> progressHandle)
        {
            m_managerEventHandler = managerEventHandler;
            IntPtr       WowWindowPointer = Helpers.Win32.FindWowWindow();
            DialogResult result           = DialogResult.Cancel;

            while (WowWindowPointer == new IntPtr())
            {
                result = MessageBox.Show("Could not find the the WoW process. Please make sure the game is running.", "Error - WoW not open", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                if (result == DialogResult.Cancel)
                {
                    Environment.Exit(1);
                }
                WowWindowPointer = Helpers.Win32.FindWowWindow();
            }
            m_eyes  = new Eyes(WowWindowPointer);
            m_hands = new Hands(WowWindowPointer);
            m_ears  = new Ears();
            m_mouth = new Mouth(progressHandle);
            m_legs  = new Legs();

            m_fishingState  = FishingState.Stopped;
            m_neededActions = NeededAction.None;

            m_fishingStats = new FishingStats();
            m_fishingStats.Reset();

            _cancellationTokenSource = null;

            InitializeTimer(ref m_LureTimer, LureTimerTick);
            InitializeTimer(ref m_CharmTimer, CharmTimerTick);
            InitializeTimer(ref m_RaftTimer, RaftTimerTick);
            InitializeTimer(ref m_BaitTimer, BaitTimerTick);
            InitializeTimer(ref m_HearthStoneTimer, HearthStoneTimerTick);
            InitializeTimer(ref m_AntiAfkTimer, AntiAfkTimerTick);

            ResetTimers();
        }