Ejemplo n.º 1
0
        private void HandleSecureKey(CrystalPacket packet)
        {
            string key = packet.Reader.ReadString();
            string name = packet.Reader.ReadString();
            if (key == Utilities.Settings.GetSettings.GetStringElement("Sync", "SecureKey"))
            {
                this.Name = name;

                lock(SyncServer.SecuredRealm)
                    SyncServer.SecuredRealm.Add(this);

                this.IsSecured = true;
                Utilities.Logger.Infos("Realm @'" + this.Name + "'@ synchronized @successfully@");
            }
            else
            {
                Utilities.Logger.Error("Secure @key is wrong@ from the realm @'" + name + "'@");
            }
        }
Ejemplo n.º 2
0
        private void HandlePlayerComming(CrystalPacket packet)
        {
            string ticket = packet.Reader.ReadString();
            var account = new ArkaliaCore.Game.Game.Models.AccountModel()
            {
                ID = packet.Reader.ReadInt32(),
                Username = packet.Reader.ReadString(),
                Password = packet.Reader.ReadString(),
                Pseudo = packet.Reader.ReadString(),
                Question = packet.Reader.ReadString(),
                Answer = packet.Reader.ReadString(),
                AdminLevel = packet.Reader.ReadInt32(),
                Points = packet.Reader.ReadInt32(),
                Vip = packet.Reader.ReadInt32(),
            };

            ArkaliaCore.Game.Game.Controllers.TicketController.RegisterTicket
                (new ArkaliaCore.Game.Game.Models.AccountTicket()
                { Ticket = ticket, Account = account, ExpireTime = 0 });
        }