Ejemplo n.º 1
0
        // Token: 0x0600003E RID: 62 RVA: 0x00004FD8 File Offset: 0x000031D8
        public void UpdateStatic()
        {
            DebugTools.Write(PlayerListUI.UppercaseFirst(this.listName) + ": Updating user interface static elements... ");
            this.settingValues          = true;
            this.CheckBoxEnable.Checked = this.Config.Enabled;
            int num = -1;

            if (this.ListView.SelectedIndices.Count == 1)
            {
                num = this.ListView.SelectedItems[0].Index;
            }
            this.ListView.Items.Clear();
            if (this.Config.Players.Count > 0)
            {
                foreach (object obj in this.Config.Players)
                {
                    PlayerElement playerElement = (PlayerElement)obj;
                    this.ListView.Items.Add(new ListViewItem(new string[]
                    {
                        playerElement.Name,
                        playerElement.SteamId.ToString()
                    })
                    {
                        Checked   = playerElement.Enabled,
                        ForeColor = this.listColour
                    });
                }
                if (num >= 0 && num < this.ListView.Items.Count)
                {
                    MainForm.ListViewFocus(this.ListView.Items, num, true);
                }
            }
            this.ButtonAdd.Enabled         = !this.restricted;
            this.ButtonRemove.Enabled      = (this.Config.Players.Count > 0);
            this.ButtonEdit.Enabled        = (this.Config.Players.Count > 0);
            this.ButtonViewProfile.Enabled = (this.Config.Players.Count > 0);
            this.ButtonExport.Enabled      = (this.Config.Players.Count > 0);
            this.LabelCount.Text           = "Player Total: " + this.Config.Players.Count;
            this.settingValues             = false;
            Debug.Print("done.");
        }
Ejemplo n.º 2
0
        // Token: 0x060000C2 RID: 194 RVA: 0x000153D4 File Offset: 0x000135D4
        public static void ListLoad(PlayerListElement PlayerList, string listName, bool validation, int listOffset, int listPointerOffset, int countOffset)
        {
            DebugTools.Write("Game Memory: Loading " + listName + " players ... ");
            int num  = 10192986 + listOffset + GameMemory.totalPlayerCount * 8;
            int num2 = num;
            int num3 = GameMemory.totalPlayerCount;

            foreach (object obj in PlayerList.Players)
            {
                PlayerElement playerElement = (PlayerElement)obj;
                if ((!validation || Array.IndexOf <ulong>(InternalConfig.GoldList, playerElement.SteamId) == -1) && playerElement.Enabled)
                {
                    GameMemory.SetBytes(num2, BitConverter.GetBytes(playerElement.SteamId));
                    num2 += 8;
                    GameMemory.totalPlayerCount++;
                }
            }
            GameMemory.SetBytes(10192986 + listPointerOffset, BitConverter.GetBytes(num));
            GameMemory.SetBytes(10192986 + countOffset, new byte[]
            {
                Convert.ToByte(GameMemory.totalPlayerCount - num3)
            });
            Debug.Print("done.");
        }