Beispiel #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();
        }
Beispiel #2
0
 private void UpdateStats()
 {
     UltimateFishBot.Classes.FishingStats stats = m_manager.GetFishingStats();
     labelSuccessCount.Text  = stats.totalSuccessFishing.ToString();
     labelNotFoundCount.Text = stats.totalNotFoundFish.ToString();
     labelNotEaredCount.Text = stats.totalNotEaredFish.ToString();
     labelTotalCount.Text    = stats.Total().ToString();
 }
Beispiel #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();
        }