Example #1
0
 private void listBoxFriend_DoubleClick(object sender, EventArgs e)
 {
     if (((ListBox)sender).SelectedIndex >= 0)
     {
         Role        currentRole = (Role)((ListBox)sender).SelectedValue;
         frmRoleInfo roleInfo    = new frmRoleInfo(currentRole);
         roleInfo.Show();
     }
 }
Example #2
0
        private void FacePic_DoubleClick(object sender, EventArgs e)
        {
            Role currentRole = (Role)((PictureBox)sender).Tag;

            if (!Win32Lib.IsCorrectStartAddress(currentRole.Address))
            {
                GlobalSpecs.NeedReSearch = true;
                MessageBox.Show("内存地址已变动,请重新查找。", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            else
            {
                frmRoleInfo roleInfo = new frmRoleInfo(currentRole);
                roleInfo.ShowDialog();
            }
        }
Example #3
0
        private bool SingleSearch()
        {
            GlobalSpecs.NeedReSearch = false;
            if (GlobalSpecs.FDPSProcess.HasExited)
            {
                gBoxProcess.Text   = "进程   无";
                gboxSearch.Enabled = false;
                MessageBox.Show("游戏不存在!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            if (txtSNowHP.Text == "" ||
                txtSMaxHP.Text == "" ||
                txtSNowMP.Text == "" ||
                txtSMaxMP.Text == "" ||
                txtSAP.Text == "" ||
                txtSDP.Text == "")
            {
                MessageBox.Show("所有条件必须都填!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            FrmAutoSerachQuestion fq = new FrmAutoSerachQuestion();

            if (fq.ShowDialog() == DialogResult.OK)
            {
                GlobalSpecs.SearchType = fq.SearchType;
            }
            else
            {
                return(false);
            }

            //GlobalSpecs.SearchType = MemorySearchType.self;

            int lNowHP;
            int lMaxHP;
            int lNowMP;
            int lMaxMP;
            int lAP;
            int lDP;

            int.TryParse(txtSNowHP.Text, out lNowHP);
            int.TryParse(txtSMaxHP.Text, out lMaxHP);
            int.TryParse(txtSNowMP.Text, out lNowMP);
            int.TryParse(txtSMaxMP.Text, out lMaxMP);
            int.TryParse(txtSAP.Text, out lAP);
            int.TryParse(txtSDP.Text, out lDP);

            Win32Lib.ProgramProcess = GlobalSpecs.FDPSProcess;
            int[] sampleData = new int[6];
            sampleData[0] = lNowHP;
            sampleData[1] = lMaxHP;
            sampleData[2] = lNowMP;
            sampleData[3] = lMaxMP;
            sampleData[4] = lAP;
            sampleData[5] = lDP;

            int baseAddress = Win32Lib.SearchMemory(sampleData, 2, -64);

            if (baseAddress == -1)
            {
                MessageBox.Show("抱歉,没找到!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            string startAddress = Win32Lib.GetAddress(baseAddress);

            if (!Win32Lib.IsCorrectStartAddress(startAddress))
            {
                MessageBox.Show("抱歉,没找到!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            GlobalSpecs.SearchStartAddress = startAddress;

            Role role = new Role(GlobalSpecs.SearchStartAddress);

            role.FillData();

            frmRoleInfo roleInfo = new frmRoleInfo(role);

            roleInfo.ShowDialog();

            return(true);
        }