本文整理汇总了C#中Aura.Shared.Network.Packet.AddServerList方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.AddServerList方法的具体用法?C# Packet.AddServerList怎么用?C# Packet.AddServerList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aura.Shared.Network.Packet
的用法示例。
在下文中一共展示了Packet.AddServerList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Internal_ChannelStatus
/// <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);
}
示例2: LoginR
/// <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);
}
示例3: ChannelStatus
/// <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);
}