本文整理汇总了C#中Bunny.Core.Client.GetChannel方法的典型用法代码示例。如果您正苦于以下问题:C# Client.GetChannel方法的具体用法?C# Client.GetChannel怎么用?C# Client.GetChannel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bunny.Core.Client
的用法示例。
在下文中一共展示了Client.GetChannel方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessChat
public static void ProcessChat(Client client, PacketReader packet)
{
var uidChar = packet.ReadMuid();
var uidChan = packet.ReadMuid();
var message = packet.ReadString();
if (client.GetChannel() != null)
client.GetChannel().Chat(client, message);
}
示例2: ProcessPlayerList
public static void ProcessPlayerList(Client client, PacketReader packet)
{
var playerId = packet.ReadUInt64();
var channelId = packet.ReadUInt64();
var page = packet.ReadInt32();
client.ClientPlayer.ChannelPage = page;
if (client.GetChannel() != null)
client.GetChannel().PlayerList(client);
}
示例3: ResponseChannelJoin
public static void ResponseChannelJoin(Client client)
{
var traits = client.GetChannel().GetTraits();
using (var packet = new PacketWriter(Operation.ChannelResponseJoin, CryptFlags.Encrypt))
{
packet.Write(traits.ChannelId);
packet.Write((Int32)traits.Type);
packet.Write(traits.ChannelName);
packet.Write(true);
client.Send(packet);
}
}
示例4: ProcessStageList
public static void ProcessStageList(Client client, PacketReader packetReader)
{
var uidChar = packetReader.ReadUInt64();
var uidChan = packetReader.ReadUInt64();
var page = packetReader.ReadInt32();
client.ClientPlayer.StageIndex = Convert.ToByte(page);
if (client.GetChannel() != null)
client.GetChannel().StageList(client);
}
示例5: ProcessStageJoin
public static void ProcessStageJoin(Client client, PacketReader packetReader)
{
var uidChar = packetReader.ReadMuid();
var uidStage = packetReader.ReadMuid();
var stage = client.GetChannel().Find(uidStage);
if (stage == null)
{
Log.Write("Failed to join stage: {0}", uidStage.HighId);
return;
}
stage.Join(client);
}
示例6: ProcessStageCreate
public static void ProcessStageCreate(Client client, PacketReader packetReader)
{
var uid = packetReader.ReadMuid();
var name = packetReader.ReadString();
var locked = packetReader.ReadBoolean();
var password = packetReader.ReadString();
if (uid != client.GetMuid())
{
client.Disconnect();
return;
}
var traits = new StageTraits();
traits.StageId = Globals.StageCounter.GetNext();
traits.Name = name;
traits.Locked = locked;
traits.Password = password;
traits.Master = client;
client.ClientPlayer.PlayerStage = client.GetChannel().Add(traits);
client.GetStage().Join(client);
}
示例7: ResponseRuleSet
public static void ResponseRuleSet(Client client)
{
var traits = client.GetChannel().GetTraits();
using (var packet = new PacketWriter(Operation.MatchResponseRuleset, CryptFlags.Encrypt))
{
packet.Write(traits.ChannelId);
packet.Write(traits.Rule.ToString().ToLower());
client.Send(packet);
}
}
示例8: ProcessRecommendedChannel
public static void ProcessRecommendedChannel(Client client, PacketReader packet)
{
if (client.GetCharacter().ClanId == 0)
client.ClientPlayer.PlayerChannel = ChannelList.Recommend(client.GetCharacter().Level);
else
{
client.ClientPlayer.PlayerChannel = ChannelList.Recommend(client.GetCharacter().Level, true, client.GetCharacter().ClanName);
}
Match.ResponseRecommendedChannel(client, client.GetChannel().GetTraits().ChannelId);
if (client.GetCharacter().ClanId != 0)
{
ClanPackets.MemberConnected(client, client.GetCharacter().Name);
}
}
示例9: ProcessAllChannelPlayerList
public static void ProcessAllChannelPlayerList(Client client, PacketReader packet)
{
if (client.GetChannel() != null)
client.GetChannel().AllPlayerList(client);
}
示例10: Refresh
public static void Refresh(Client client)
{
if (client.GetChannel() != null)
client.GetChannel().Refresh();
}
示例11: Join
public void Join(Client client)
{
lock (_objectLock)
{
if (client.GetChannel() != null)
client.GetChannel().Leave(client);
_traits.Playerlist.Add(client);
client.ClientPlayer.PlayerChannel = this;
ChannelPackets.ResponseChannelJoin(client);
ChannelPackets.ResponseRuleSet(client);
_traits.Playerlist.ForEach(delegate(Client c)
{
PlayerList(c);
StageList(c);
});
}
}