Exemple #1
0
        public static void Handle(Player player, byte[] packet)
        {
            AccountId     = Encoding.Default.GetString(packet, 4, 16).Trim((char)0x0000);
            CharName      = Encoding.Default.GetString(packet, 20, 16).Trim((char)0x0000);
            Model         = BitConverter.ToUInt16(packet, 52);
            Job           = (byte)BitConverter.ToUInt16(packet, 54);
            NameAvailable = GameWorld.NameAvailable(CharName);

            Player            = SelectorSystem.GetOrCreatePlayer(AccountId, player.Password);
            Player.GameSocket = player.GameSocket;
            Process();
            BufferPool.RecycleBuffer(packet);
        }
Exemple #2
0
        public static void Process()
        {
            var player = SelectorSystem.GetOrCreatePlayer(AccountId, Password);

            player.IP             = Player.GameSocket.GetIP();
            player.GameSocket     = Player.GameSocket;
            player.GameSocket.Ref = Player;
            Player = player;

            if (Player.LoginType == LoginType.Create)
            {
                NewAccount();
            }
            else
            {
                Authenticate();
            }
        }