Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (nextAcct >= 0xFFFF)
            {
                MessageBox.Show("Error: UOX3 Only Supports Accounts with numbers 0-65534!", "Failure");
                return;
            }

            AccountObject newAcct = new AccountObject(nextAcct);
            string        name    = "guest" + nextAcct.ToString();

            if (nextAcct == 0)
            {
                name = "admin";
                newAcct.SetFlag(0x8000, true);
            }

            newAcct.Name = name;
            newAcct.Pass = name;
            accountList.Add(name, newAcct);
            listAccounts.Items.Add(name + " (" + nextAcct.ToString() + ")");
            listAccounts.SelectedIndex = listAccounts.Items.Count - 1;
            ++nextAcct;
            ++numAccts;

            UpdateStats();
        }
Exemplo n.º 2
0
 private void cbBlockSlot_CheckedChanged(object sender, EventArgs e)
 {
     if (selSlot != null && assocAcct != null && listCharacters.Items.Count > 0)
     {
         ushort flag = (ushort)Math.Pow(2, (4 + listCharacters.SelectedIndex));
         assocAcct.SetFlag(flag, cbBlockSlot.Checked);
     }
 }
Exemplo n.º 3
0
 private void rdGM_CheckedChanged(object sender, EventArgs e)
 {
     if (selAcct != null)
     {
         selAcct.SetFlag(0x8000, rdGM.Checked);
     }
 }