Exemplo n.º 1
0
        /// <summary>
        /// Sends AccountInfoRequestR to client, with client's account's data.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="success"></param>
        public static void AccountInfoRequestR(LoginClient client, bool success)
        {
            var packet = new Packet(Op.AccountInfoRequestR, MabiId.Login);
            packet.PutByte(success);

            if (success)
                packet.Add(client.Account);

            client.Send(packet);
        }
Exemplo n.º 2
0
		/// <summary>
		/// Sends positive response to login.
		/// </summary>
		/// <param name="client"></param>
		/// <param name="account"></param>
		/// <param name="sessionKey"></param>
		/// <param name="serverList"></param>
		public static void LoginR(LoginClient client, Account account, long sessionKey, ICollection<ServerInfo> serverList)
		{
			var packet = new Packet(Op.LoginR, MabiId.Login);
			packet.PutByte((byte)LoginResult.Success);
			packet.PutString(account.Name);
			// [160XXX] Double account name
			{
				packet.PutString(account.Name);
			}
			packet.PutLong(sessionKey);
			packet.PutByte(0);

			// Servers
			// --------------------------------------------------------------
			packet.AddServerList(serverList, ServerInfoType.Client);

			// Account Info
			// --------------------------------------------------------------
			packet.Add(account);

			client.Send(packet);
		}
Exemplo n.º 3
0
Arquivo: Send.cs Projeto: pie3467/aura
        /// <summary>
        /// Sends positive response to login.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="account"></param>
        /// <param name="sessionKey"></param>
        /// <param name="servers"></param>
        public static void LoginR(LoginClient client, Account account, long sessionKey, List<ServerInfo> servers)
        {
            var packet = new Packet(Op.LoginR, MabiId.Login);
            packet.PutByte((byte)LoginResult.Success);
            packet.PutString(account.Name);
            // [160XXX] Double account name
            {
                packet.PutString(account.Name);
            }
            packet.PutLong(sessionKey);
            packet.PutByte(0);

            // Servers
            // --------------------------------------------------------------
            packet.PutByte((byte)servers.Count);
            foreach (var server in servers)
                packet.Add(server);

            // Account Info
            // --------------------------------------------------------------
            packet.Add(account);

            client.Send(packet);
        }
Exemplo n.º 4
0
Arquivo: Send.cs Projeto: pie3467/aura
        /// <summary>
        /// Sends server/channel status update to all connected clients,
        /// incl channels.
        /// </summary>
        public static void ChannelUpdate()
        {
            var packet = new Packet(Op.ChannelStatus, MabiId.Login);
            packet.PutByte((byte)LoginServer.Instance.ServerList.List.Count);
            foreach (var server in LoginServer.Instance.ServerList.List)
                packet.Add(server);

            LoginServer.Instance.Broadcast(packet);
        }