Exemplo n.º 1
0
 // Token: 0x0600004B RID: 75 RVA: 0x00005CF0 File Offset: 0x00003EF0
 public void AddPlayer(ListView.SelectedIndexCollection indices)
 {
     foreach (object obj in indices)
     {
         int num = (int)obj;
         GameData.PlayerOnline playerOnline = GameData.PlayerList[num];
         this.AddPlayer(playerOnline.LocalList[(int)(playerOnline.LocalCount - 1)].Name, playerOnline.SteamId, true);
     }
     this.UpdateStatic();
     GameMemory.OptionsUpdate();
     if (indices.Count > 1)
     {
         MainForm.Message(string.Concat(new object[]
         {
             "Added ",
             indices.Count,
             " players to the ",
             this.listName,
             "."
         }), 50);
         DebugTools.Print(string.Concat(new object[]
         {
             PlayerListUI.UppercaseFirst(this.listName),
             ": Added ",
             indices.Count,
             " players."
         }));
     }
 }
Exemplo n.º 2
0
 // Token: 0x06000042 RID: 66 RVA: 0x000053B0 File Offset: 0x000035B0
 public void AddPlayer()
 {
     DebugTools.Print("Open dialog box: Add " + this.listName + " entry (DialogBoxPlayer)");
     using (DialogBoxPlayer dialogBoxPlayer = new DialogBoxPlayer())
     {
         dialogBoxPlayer.Text               = "Add Player";
         dialogBoxPlayer.LabelTitle.Text    = "Add this player to the " + this.listName + ":";
         dialogBoxPlayer.ButtonConfirm.Text = "Add";
         dialogBoxPlayer.TextBoxPlayerName.Select();
         bool flag = false;
         while (!flag)
         {
             try
             {
                 if (dialogBoxPlayer.ShowDialog() == DialogResult.OK)
                 {
                     this.AddPlayer(dialogBoxPlayer.TextBoxPlayerName.Text, Convert.ToUInt64(dialogBoxPlayer.TextBoxPlayerSteamID.Text), dialogBoxPlayer.CheckBoxPlayerEnabled.Checked);
                     this.UpdateStatic();
                     GameMemory.OptionsUpdate();
                 }
                 flag = true;
             }
             catch
             {
                 DebugTools.Print("Error: Failed to add player to the " + this.listName + ", invalid Steam ID.");
                 MessageBox.Show("The Steam ID is invalid.", "Could not add player.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             }
         }
     }
 }
Exemplo n.º 3
0
 // Token: 0x06000046 RID: 70 RVA: 0x0000592C File Offset: 0x00003B2C
 public void TextImport()
 {
     DebugTools.Print("Open dialog box: " + PlayerListUI.UppercaseFirst(this.listName) + " Import (DialogBoxImportExport)");
     using (DialogBoxImportExport dialogBoxImportExport = new DialogBoxImportExport())
     {
         dialogBoxImportExport.Text = PlayerListUI.UppercaseFirst(this.listName) + " Import";
         dialogBoxImportExport.ButtonImport.Visible = true;
         dialogBoxImportExport.ButtonCancel.Text    = "Cancel";
         if (this.restricted)
         {
             dialogBoxImportExport.CheckBoxEncryptedText.Enabled = false;
             dialogBoxImportExport.CheckBoxEncryptedText.Checked = true;
         }
         if (dialogBoxImportExport.ShowDialog() == DialogResult.OK)
         {
             if (dialogBoxImportExport.CheckBoxEncryptedText.Checked)
             {
                 dialogBoxImportExport.DecryptTextBox();
             }
             this.TextImport(dialogBoxImportExport.TextBoxImportExport.Lines);
             this.UpdateStatic();
             GameMemory.OptionsUpdate();
         }
     }
 }
Exemplo n.º 4
0
        // Token: 0x06000041 RID: 65 RVA: 0x000052AC File Offset: 0x000034AC
        public void RemovePlayer()
        {
            int count = this.ListView.SelectedIndices.Count;

            for (int i = this.ListView.SelectedItems.Count - 1; i >= 0; i--)
            {
                int index = this.ListView.SelectedIndices[i];
                DebugTools.Print("Option change: Remove " + PlayerListUI.UppercaseFirst(this.listName) + " entry.");
                this.Config.Players.RemoveAt(index);
                MainForm.Message(this.ListView.Items[index].SubItems[0].Text + " was removed from the " + this.listName, 50);
            }
            this.UpdateStatic();
            GameMemory.OptionsUpdate();
            if (count > 1)
            {
                MainForm.Message(string.Concat(new object[]
                {
                    "Removed ",
                    count,
                    " players from the ",
                    this.listName,
                    "."
                }), 50);
            }
        }
Exemplo n.º 5
0
 // Token: 0x06000040 RID: 64 RVA: 0x00005234 File Offset: 0x00003434
 public void TogglePlayer(ItemCheckedEventArgs e)
 {
     if (!this.settingValues)
     {
         DebugTools.Print("Option change: Toggle " + this.listName + " entry");
         this.Config.Players[e.Item.Index].Enabled = !this.Config.Players[e.Item.Index].Enabled;
         GameMemory.OptionsUpdate();
     }
 }
Exemplo n.º 6
0
 // Token: 0x060000BC RID: 188 RVA: 0x000150B0 File Offset: 0x000132B0
 public static void UpdateHandle()
 {
     Process[] processesByName = Process.GetProcessesByName("ASN_App_PcDx9_Final");
     if (processesByName.Length != 0)
     {
         if (GameMemory.gameHandle == 0)
         {
             DebugTools.Print("Update handle: Found new game handle.");
             GameMemory.processId  = processesByName[0].Id;
             GameMemory.gameHandle = GameMemory.OpenProcess(56, 0, GameMemory.processId);
             DebugTools.Print("Update handle: Will wait " + GameMemory.newHandleTime * 100 + "ms before loading game config.");
         }
     }
     else
     {
         GameMemory.gameHandle = 0;
         GameMemory.processId  = 0;
         if (GameMemory._OverlayProcess != null)
         {
             DebugTools.Print("Update handle: Lost game handle.");
             GameMemory.OverlayUnload();
         }
     }
     if (GameMemory.gameHandle > 0)
     {
         GameData.Update();
         if (GameMemory.newHandleTime > 0)
         {
             GameMemory.newHandleTime--;
             if (GameMemory.newHandleTime == 0)
             {
                 MainForm.AllLobbiesUI.RefreshList();
                 GameData.Update();
                 if (SteamData.errorCode == 0 && GameData.youAreHost)
                 {
                     SteamData.SetPlayerLimit(20);
                 }
                 GameMemory.ListCheckerLoad();
                 GameMemory.FullLobbyFixLoad();
                 GameMemory.HostMigrationFixLoad();
                 GameMemory.SLTCheckerLoad();
                 GameMemory.OptionsUpdate();
                 GameMemory.OverlayLoad();
                 return;
             }
         }
     }
     else
     {
         GameMemory.newHandleTime = 50;
     }
 }
Exemplo n.º 7
0
 // Token: 0x06000044 RID: 68 RVA: 0x00005688 File Offset: 0x00003888
 public void EditPlayer()
 {
     foreach (object obj in this.ListView.SelectedIndices)
     {
         int index = (int)obj;
         DebugTools.Print("Open dialog box: Edit " + this.listName + " entry (DialogBoxPlayer)");
         using (DialogBoxPlayer dialogBoxPlayer = new DialogBoxPlayer())
         {
             dialogBoxPlayer.Text            = "Edit Player";
             dialogBoxPlayer.LabelTitle.Text = string.Concat(new string[]
             {
                 "Edit ",
                 this.Config.Players[index].Name,
                 "'s ",
                 this.listName,
                 " entry:"
             });
             dialogBoxPlayer.ButtonConfirm.Text = "Confirm";
             dialogBoxPlayer.TextBoxPlayerName.Select();
             dialogBoxPlayer.TextBoxPlayerName.Text        = this.Config.Players[index].Name;
             dialogBoxPlayer.TextBoxPlayerSteamID.Text     = this.Config.Players[index].SteamId.ToString();
             dialogBoxPlayer.CheckBoxPlayerEnabled.Checked = this.Config.Players[index].Enabled;
             dialogBoxPlayer.TextBoxPlayerSteamID.Enabled  = !this.restricted;
             for (;;)
             {
                 try
                 {
                     if (dialogBoxPlayer.ShowDialog() == DialogResult.OK)
                     {
                         this.EditPlayer(dialogBoxPlayer.TextBoxPlayerName.Text, Convert.ToUInt64(dialogBoxPlayer.TextBoxPlayerSteamID.Text), dialogBoxPlayer.CheckBoxPlayerEnabled.Checked, index);
                         this.UpdateStatic();
                         GameMemory.OptionsUpdate();
                     }
                     break;
                 }
                 catch
                 {
                     DebugTools.Print("Error: Failed to edit " + this.listName + " entry, invalid Steam ID.");
                     MessageBox.Show("The Steam ID is invalid.", "Could not edit player.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 }
             }
         }
     }
 }
Exemplo n.º 8
0
 // Token: 0x06000043 RID: 67 RVA: 0x000054C8 File Offset: 0x000036C8
 public void AddFriends()
 {
     DebugTools.Print("Open dialog box: Add friends (DialogBoxAddFriends)");
     using (DialogBoxAddFriends dialogBoxAddFriends = new DialogBoxAddFriends())
     {
         foreach (SteamData.Player player in SteamData.FriendList)
         {
             dialogBoxAddFriends.ListView.Items.Add(new ListViewItem(player.name));
         }
         if (dialogBoxAddFriends.ShowDialog() == DialogResult.OK)
         {
             foreach (object obj in dialogBoxAddFriends.ListView.SelectedIndices)
             {
                 int num = (int)obj;
                 this.AddPlayer(SteamData.FriendList[num].name, SteamData.FriendList[num].steamId, true);
             }
             this.UpdateStatic();
             GameMemory.OptionsUpdate();
             if (dialogBoxAddFriends.ListView.SelectedIndices.Count > 1)
             {
                 MainForm.Message(string.Concat(new object[]
                 {
                     "Added ",
                     dialogBoxAddFriends.ListView.SelectedIndices.Count,
                     " friends to the ",
                     this.listName,
                     "."
                 }), 50);
                 DebugTools.Print(string.Concat(new object[]
                 {
                     PlayerListUI.UppercaseFirst(this.listName),
                     ": Added ",
                     dialogBoxAddFriends.ListView.SelectedIndices.Count,
                     " friends."
                 }));
             }
         }
     }
 }
Exemplo n.º 9
0
 // Token: 0x0600003F RID: 63 RVA: 0x000051FC File Offset: 0x000033FC
 public void ToggleList()
 {
     DebugTools.Print("Option change: Toggle " + this.listName);
     this.Config.Enabled = !this.Config.Enabled;
     GameMemory.OptionsUpdate();
 }
Exemplo n.º 10
0
 // Token: 0x06000011 RID: 17 RVA: 0x00002CB7 File Offset: 0x00000EB7
 public void ToggleMirrorTracks()
 {
     DebugTools.Print("Option change: Toggle mirror tracks");
     this.Config.DisableMirrorTracks = !this.Config.DisableMirrorTracks;
     GameMemory.OptionsUpdate();
 }
Exemplo n.º 11
0
 // Token: 0x06000010 RID: 16 RVA: 0x00002C8D File Offset: 0x00000E8D
 public void ToggleSkipLobbySearch()
 {
     DebugTools.Print("Option change: Toggle skip lobby search");
     this.Config.SkipLobbySearch = !this.Config.SkipLobbySearch;
     GameMemory.OptionsUpdate();
 }