Exemplo n.º 1
0
 public AccountProfile(ServerProfile server, string title, string username, string password)
 {
     this.m_Server = server;
     this.m_Title = title;
     this.m_Username = username;
     this.m_Password = password;
     this.m_Shards = new ShardProfile[0];
 }
Exemplo n.º 2
0
 public AccountProfile(ServerProfile server, string title, string username, string password)
 {
     this.m_Server   = server;
     this.m_Title    = title;
     this.m_Username = username;
     this.m_Password = password;
     this.m_Shards   = new ShardProfile[0];
 }
Exemplo n.º 3
0
 public ServerSync(ServerProfile server, AccountProfile account, ShardProfile shard)
 {
     this.m_Server         = server;
     this.m_Account        = account;
     this.m_Shard          = shard;
     this.m_Buffer         = new byte[0x800];
     this.m_CryptoProvider = new LoginCrypto((uint)Network.ClientIP);
     Dns.BeginResolve(server.Address, new AsyncCallback(this.OnResolve), null);
 }
Exemplo n.º 4
0
 public ServerSync(ServerProfile server, AccountProfile account, ShardProfile shard)
 {
     this.m_Server = server;
     this.m_Account = account;
     this.m_Shard = shard;
     this.m_Buffer = new byte[0x800];
     this.m_CryptoProvider = new LoginCrypto((uint) Network.ClientIP);
     Dns.BeginResolve(server.Address, new AsyncCallback(this.OnResolve), null);
 }
Exemplo n.º 5
0
 public ShardSync(ServerProfile server, AccountProfile account, ShardProfile shard)
 {
     this.m_Server = server;
     this.m_Account = account;
     this.m_Shard = shard;
     this.m_Compressed = new byte[0x800];
     this.m_Buffer = new byte[0x800];
     this.m_CryptoProvider = new GameCrypto((uint) shard.Auth);
     this.Connect(new IPEndPoint(shard.Address, shard.Port));
 }
Exemplo n.º 6
0
 public ShardSync(ServerProfile server, AccountProfile account, ShardProfile shard)
 {
     this.m_Server         = server;
     this.m_Account        = account;
     this.m_Shard          = shard;
     this.m_Compressed     = new byte[0x800];
     this.m_Buffer         = new byte[0x800];
     this.m_CryptoProvider = new GameCrypto((uint)shard.Auth);
     this.Connect(new IPEndPoint(shard.Address, shard.Port));
 }
Exemplo n.º 7
0
 public static void AddServer(ServerProfile server)
 {
     ServerProfile[] list = List;
     m_List = new ServerProfile[list.Length + 1];
     for (int i = 0; i < list.Length; i++)
     {
         m_List[i] = list[i];
     }
     m_List[list.Length] = server;
 }
Exemplo n.º 8
0
 public static void AddServer(ServerProfile server)
 {
     ServerProfile[] list = List;
     m_List = new ServerProfile[list.Length + 1];
     for (int i = 0; i < list.Length; i++)
     {
         m_List[i] = list[i];
     }
     m_List[list.Length] = server;
 }
Exemplo n.º 9
0
 public GNewAccount(ServerProfile server) : base(0, 0, 320, 110)
 {
     this.m_Server   = server;
     Gumps.Focus     = this;
     base.Text       = "New Account";
     this.m_Title    = this.AddTextBox("Title:", 0, '\0');
     this.m_Username = this.AddTextBox("Username:"******"Password:"******"Okay", 1, new OnClick(this.Okay_OnClick));
     this.AddButton("Cancel", 2, new OnClick(this.Cancel_OnClick));
     this.Center();
 }
Exemplo n.º 10
0
 public GNewAccount(ServerProfile server)
     : base(0, 0, 320, 110)
 {
     this.m_Server = server;
     Gumps.Focus = this;
     base.Text = "New Account";
     this.m_Title = this.AddTextBox("Title:", 0, '\0');
     this.m_Username = this.AddTextBox("Username:"******"Password:"******"Okay", 1, new OnClick(this.Okay_OnClick));
     this.AddButton("Cancel", 2, new OnClick(this.Cancel_OnClick));
     this.Center();
 }
Exemplo n.º 11
0
        private static ServerProfile[] Load()
        {
            if (!File.Exists(Engine.FileManager.BasePath("Data/Profiles.xml")))
            {
                return(new ServerProfile[0]);
            }
            XmlDocument document = new XmlDocument();

            document.Load(Engine.FileManager.BasePath("Data/Profiles.xml"));
            ArrayList list = new ArrayList();

            foreach (XmlElement element in document.GetElementsByTagName("server"))
            {
                string        attribute = element.GetAttribute("title");
                string        address   = element.GetAttribute("address");
                string        s         = element.GetAttribute("port");
                ServerProfile server    = new ServerProfile(attribute, address, XmlConvert.ToInt32(s));
                foreach (XmlElement element2 in element.GetElementsByTagName("account"))
                {
                    string         title    = element2.GetAttribute("title");
                    string         username = element2.GetAttribute("username");
                    string         password = element2.GetAttribute("password");
                    AccountProfile account  = new AccountProfile(server, title, username, password);
                    foreach (XmlElement element3 in element2.GetElementsByTagName("shard"))
                    {
                        string       name     = element3.GetAttribute("name");
                        string       ipString = element3.GetAttribute("address");
                        string       str10    = element3.GetAttribute("port");
                        string       str11    = element3.GetAttribute("index");
                        string       str12    = element3.GetAttribute("timeZone");
                        string       str13    = element3.GetAttribute("percentFull");
                        string       str14    = element3.GetAttribute("auth");
                        ShardProfile shard    = new ShardProfile(account, IPAddress.Parse(ipString), XmlConvert.ToInt32(str10), XmlConvert.ToInt32(str11), XmlConvert.ToInt32(str12), XmlConvert.ToInt32(str13), XmlConvert.ToInt32(str14), name);
                        foreach (XmlElement element4 in element3.GetElementsByTagName("character"))
                        {
                            string str15 = element4.GetAttribute("index");
                            string str16 = element4.GetAttribute("name");
                            shard.AddCharacter(new CharacterProfile(shard, str16, XmlConvert.ToInt32(str15)));
                        }
                        account.AddShard(shard);
                    }
                    server.AddAccount(account);
                }
                list.Add(server);
            }
            return((ServerProfile[])list.ToArray(typeof(ServerProfile)));
        }
Exemplo n.º 12
0
 public GNewAccountMenu(ServerProfile server, string text)
     : base(text)
 {
     this.m_Server = server;
 }
Exemplo n.º 13
0
 public GNewAccountMenu(ServerProfile server, string text) : base(text)
 {
     this.m_Server = server;
 }
Exemplo n.º 14
0
 private static ServerProfile[] Load()
 {
     if (!File.Exists(Engine.FileManager.BasePath("Data/Profiles.xml")))
     {
         return new ServerProfile[0];
     }
     XmlDocument document = new XmlDocument();
     document.Load(Engine.FileManager.BasePath("Data/Profiles.xml"));
     ArrayList list = new ArrayList();
     foreach (XmlElement element in document.GetElementsByTagName("server"))
     {
         string attribute = element.GetAttribute("title");
         string address = element.GetAttribute("address");
         string s = element.GetAttribute("port");
         ServerProfile server = new ServerProfile(attribute, address, XmlConvert.ToInt32(s));
         foreach (XmlElement element2 in element.GetElementsByTagName("account"))
         {
             string title = element2.GetAttribute("title");
             string username = element2.GetAttribute("username");
             string password = element2.GetAttribute("password");
             AccountProfile account = new AccountProfile(server, title, username, password);
             foreach (XmlElement element3 in element2.GetElementsByTagName("shard"))
             {
                 string name = element3.GetAttribute("name");
                 string ipString = element3.GetAttribute("address");
                 string str10 = element3.GetAttribute("port");
                 string str11 = element3.GetAttribute("index");
                 string str12 = element3.GetAttribute("timeZone");
                 string str13 = element3.GetAttribute("percentFull");
                 string str14 = element3.GetAttribute("auth");
                 ShardProfile shard = new ShardProfile(account, IPAddress.Parse(ipString), XmlConvert.ToInt32(str10), XmlConvert.ToInt32(str11), XmlConvert.ToInt32(str12), XmlConvert.ToInt32(str13), XmlConvert.ToInt32(str14), name);
                 foreach (XmlElement element4 in element3.GetElementsByTagName("character"))
                 {
                     string str15 = element4.GetAttribute("index");
                     string str16 = element4.GetAttribute("name");
                     shard.AddCharacter(new CharacterProfile(shard, str16, XmlConvert.ToInt32(str15)));
                 }
                 account.AddShard(shard);
             }
             server.AddAccount(account);
         }
         list.Add(server);
     }
     return (ServerProfile[]) list.ToArray(typeof(ServerProfile));
 }