本文整理汇总了C#中Bunny.Core.Client.Send方法的典型用法代码示例。如果您正苦于以下问题:C# Client.Send方法的具体用法?C# Client.Send怎么用?C# Client.Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bunny.Core.Client
的用法示例。
在下文中一共展示了Client.Send方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResponseChannelList
public static void ResponseChannelList(Client client, List<Channel> channels)
{
using (var packet = new PacketWriter(Operation.ChannelList, CryptFlags.Decrypt))
{
packet.Write(channels.Count, 88);
Int16 index = 0;
foreach (var c in channels)
{
var traits = c.GetTraits();
packet.Write(traits.ChannelId);
packet.Write(++index);
packet.Write((Int16)traits.Playerlist.Count);
packet.Write((Int16)traits.MaxUsers);
packet.Write((Int16)traits.MinLevel);
packet.Write((Int16)traits.MaxLevel);
packet.Write((byte)traits.Type);
packet.Write(traits.ChannelName, 64);
packet.Write(false);
packet.Write(0);
}
client.Send(packet);
}
}
示例2: ResponseCharacterItemList
public static void ResponseCharacterItemList(Client client)
{
using (var packet = new PacketWriter(Operation.MatchResponseCharacterItemList, CryptFlags.Decrypt))
{
packet.Write(client.GetCharacter().Bp);
packet.Write(17, 8);
for (var i = 0; i < 17; ++i)
{
packet.Write(0);
packet.Write(client.GetCharacter().EquippedItems[i].ItemCid);
}
packet.Write(client.GetCharacter().Items.Count, 24);
foreach (var i in client.GetCharacter().Items)
{
packet.Write(0);
packet.Write(i.ItemCid);
packet.Write(i.ItemId);
packet.Write(i.RentHour);
packet.Write(0);
packet.Write(i.Quantity);
}
packet.Write(0, 12);
client.Send(packet);
}
}
示例3: ResponseAllPlayerList
public static void ResponseAllPlayerList(Client client, List<Client> clients, Muid channelId)
{
using (var packet = new PacketWriter(Operation.ChannelResponseAllPlayerList, CryptFlags.Encrypt))
{
packet.Write(channelId);
packet.Write(clients.Count, 73);
foreach (var c in clients)
{
packet.Write(c.GetMuid());
packet.Write(c.GetCharacter().Name, 32);
packet.Write(c.GetCharacter().ClanName, 16);
packet.Write((byte)c.GetCharacter().Level);
packet.Write((byte)c.GetCharacter().DuelRank);//dagger for duel tourney.
packet.Write((Int32)c.ClientPlayer.PlayerLocation);
packet.Write((byte)c.ClientPlayer.PlayerAccount.Access);
packet.Write((byte)2);
packet.Write(c.GetCharacter().ClanId);
packet.Write(0);//unknown.
packet.Write((byte)3);//unknown
}
client.Send(packet);
}
}
示例4: ClanInfo
public static void ClanInfo(Client client, string clanName)
{
var player = client.ClientPlayer;
var info = new ClanInfo();
var clanId = Globals.GunzDatabase.GetClanId(clanName);
Globals.GunzDatabase.GetClanInfo(clanId, ref info);
if (info == null)
return;
info.ConnectedMembers = Convert.ToInt16(TcpServer.GetClanMembers(clanId).Count);
using (var packet = new PacketWriter(Operation.MatchClanResponseClanInfo, CryptFlags.Encrypt))
{
packet.Write(1, 78);
packet.Write(info.Name, 16);
packet.Write(info.Level);
packet.Write(info.Points);
packet.Write(info.TotalPoints);
packet.Write(info.Ranking);
packet.Write(info.Master, 32);
packet.Write(info.Wins);
packet.Write(info.Losses);
packet.Write(info.MemberCount);
packet.Write(info.ConnectedMembers);
packet.Write(info.ClanId);
packet.Write(info.EmblemChecksum);
client.Send(packet);
}
}
示例5: ReserveStageToAgent
public static void ReserveStageToAgent(Client client, Muid stageId)
{
using (var packet = new PacketWriter(Operation.AgentStageReserve, CryptFlags.Encrypt))
{
packet.Write(stageId);
client.Send(packet);
}
}
示例6: ResponseBuyItem
public static void ResponseBuyItem(Client client, Results results)
{
using (var packet = new PacketWriter(Operation.MatchResponseBuyItem, CryptFlags.Decrypt))
{
packet.Write((Int32)results);
client.Send(packet);
}
}
示例7: ExpelMemberNotAllowed
public static void ExpelMemberNotAllowed(Client client)
{
using (var expelMember = new PacketWriter(Operation.MatchClanAdminResponseLeaveMember, CryptFlags.Encrypt))
{
expelMember.Write((Int32)Results.ClanNotAuthorized);
client.Send(expelMember);
}
}
示例8: Notify
public static void Notify(Client client, Int32 error)
{
using (var packet = new PacketWriter(Operation.MatchNotify, CryptFlags.Encrypt))
{
packet.Write(error);
client.Send(packet);
}
}
示例9: ResponsePeerRelay
public static void ResponsePeerRelay(Client client, Muid playerId)
{
using (var packet = new PacketWriter(Operation.MatchResponsePeerRelay, CryptFlags.Encrypt))
{
packet.Write(playerId);
client.Send(packet);
}
}
示例10: AgentError
public static void AgentError(Client client, Int32 error)
{
using (var packet = new PacketWriter(Operation.AgentError, CryptFlags.Encrypt))
{
packet.Write(error);
client.Send(packet);
}
}
示例11: ResponseLiveCheckk
public static void ResponseLiveCheckk(Client client, Int32 timeStamp)
{
using (var packet = new PacketWriter(Operation.MatchAgentResponseLiveCheck, CryptFlags.Encrypt))
{
packet.Write(timeStamp);
client.Send(packet);
}
}
示例12: ResponseBridgePeer
public static void ResponseBridgePeer(Client client)
{
using (var packet = new PacketWriter(Operation.BridgeResponse, CryptFlags.Decrypt))
{
packet.Write(client.GetMuid());
packet.Write((Int32)Results.Accepted);
client.Send(packet);
}
}
示例13: LadderPrepare
public static void LadderPrepare(Client client, int teamNumber)
{
using (var packet = new PacketWriter(Operation.LadderPrepare, CryptFlags.Encrypt))
{
packet.Write(client.GetMuid());
packet.Write(teamNumber);
client.Send(packet);
}
}
示例14: RelayPeer
public static void RelayPeer(Client client, Bunny.Utility.Tuple<Muid,Muid,Muid> uids)
{
using (var packet = new PacketWriter(Operation.AgentRelayPeer, CryptFlags.Encrypt))
{
packet.Write(uids.First);
packet.Write(uids.Second);
packet.Write(uids.Third);
client.Send(packet);
}
}
示例15: AgentLocateToClient
public static void AgentLocateToClient(Client client, Muid agentId)
{
using (var packet = new PacketWriter(Operation.AgentLocateToClient, CryptFlags.Encrypt))
{
packet.Write(agentId);
packet.Write(Globals.Config.Agent.RemoteIp);
packet.Write((Int32)Globals.Config.Agent.TcpPort);
packet.Write((Int32)Globals.Config.Agent.UdpPort);
Log.Write("Telling client to locate to: {0}:{1}:{2}", Globals.Config.Agent.RemoteIp,
Globals.Config.Agent.TcpPort, Globals.Config.Agent.UdpPort);
client.Send(packet);
}
}