/// <summary> /// Sends server/channel status update to all connected channels. /// </summary> public static void Internal_ChannelStatus(ICollection<ServerInfo> serverList) { var packet = new Packet(Op.Internal.ChannelStatus, MabiId.Login); packet.AddServerList(serverList, ServerInfoType.Internal); LoginServer.Instance.BroadcastChannels(packet); }
/// <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); }
/// <summary> /// Sends server/channel status update to all connected players. /// </summary> public static void ChannelStatus(ICollection<ServerInfo> serverList) { var packet = new Packet(Op.ChannelStatus, MabiId.Login); packet.AddServerList(serverList, ServerInfoType.Client); LoginServer.Instance.BroadcastPlayers(packet); }