コード例 #1
0
ファイル: Game1.cs プロジェクト: Marteen21/Bellona_XNA
 public bool ConnectToMainWoW(string windowTitle) {
     GameEnabled = false;
     radarctrl = new RadarControl();
     mainwow = new WoWConnection(windowTitle);
     if (!mainwow.TryToConnect()) {
         throw new Exception();
     }
     mainPlayer = new WoWPlayer(mainwow.Connection.ReadUInt64((uint)mainwow.Connection.MainModule.BaseAddress + MemoryOffsets.GlobalInfoPlayerGUID));
     GameEnabled = true;
     return true;
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: Marteen21/Bellona_XNA
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn &&
                e.RowIndex >= 0) {
                try {
                    WoWConnection tempWoW = new WoWConnection(senderGrid["col_WinTitle", e.RowIndex].Value.ToString());
                    tempWoW.TryToConnect();
                    WoWPlayer.SetWindowTitleForPlayer(ref Game1.allPlayers, tempWoW.GetPlayerGUID(), (senderGrid["col_WinTitle", e.RowIndex].Value.ToString()));
                }
                catch (NullReferenceException) {

                }
            }
        }