Beispiel #1
0
 internal Account Add(string name, int id, ServerName server)
 {
     OutwarHttpSocket socket = new OutwarHttpSocket();
     Account a = new Account(socket, name, id, server);
     Accounts.Add(a);
     return a;
 }
Beispiel #2
0
 internal void SetMain(Account a)
 {
     mMainIndex = Accounts.IndexOf(a);
 }
 internal ReturnToStartHandler(Account a)
 {
     mAccount = a;
     mOriginalRoom = NULL_ROOM;
 }
Beispiel #4
0
 internal void Remove(Account a)
 {
     Accounts.Remove(a);
 }
Beispiel #5
0
        internal void UpdateDisplay(Account acc)
        {
            if (InvokeRequired)
            {
                //Invoke(new MethodInvoker(UpdateDisplay));
                Invoke((Delegate)new System.Action<Account>((Account _acc) => { UpdateDisplay(_acc); }), new[] { acc });
                return;
            }

            lblMisc.Text = "Experience gained: " + Globals.ExpGained;

            if (acc != null)
            {
                //lblExp.Text = string.Format("{0:n0}", acc.Exp);
                //lblRage.Text = string.Format("{0:n0}", acc.Rage);
                //lblGold.Text = string.Format("{0:n0}", acc.Gold);

                int i = AccountsPanel.Engine.Accounts.IndexOf(acc);
                AccountsPanel.Accounts[i].SubItems[0].Text = acc.Name;
                AccountsPanel.Accounts[i].SubItems[1].Text = acc.Mover.Location == null ? "-" : acc.Mover.Location.Id.ToString();
                AccountsPanel.Accounts[i].SubItems[2].Text = acc.Mover.MobsAttacked.ToString();
                AccountsPanel.Accounts[i].SubItems[3].Text = acc.Mover.ExpGained.ToString();
                AccountsPanel.Accounts[i].SubItems[4].Text = acc.Mover.MobsAttacked == 0 ? "-" : (acc.Mover.ExpGained / acc.Mover.MobsAttacked).ToString();
                AccountsPanel.Accounts[i].SubItems[5].Text = acc.Rage.ToString();
                AccountsPanel.Accounts[i].SubItems[6].Text = acc.Level.ToString();
            }
        }