当前位置: 首页>>代码示例>>C#>>正文


C# Client.GetChannel方法代码示例

本文整理汇总了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);
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:9,代码来源:Channel.cs

示例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);
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:11,代码来源:Channel.cs

示例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);
            }
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:14,代码来源:ChannelPackets.cs

示例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);
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:10,代码来源:StageHandler.cs

示例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);
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:15,代码来源:StageHandler.cs

示例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);
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:23,代码来源:StageHandler.cs

示例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);
            }
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:11,代码来源:ChannelPackets.cs

示例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);
            }
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:16,代码来源:Channel.cs

示例9: ProcessAllChannelPlayerList

 public static void ProcessAllChannelPlayerList(Client client, PacketReader packet)
 {
     if (client.GetChannel() != null)
         client.GetChannel().AllPlayerList(client);
 }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:5,代码来源:Channel.cs

示例10: Refresh

 public static void Refresh(Client client)
 {
     if (client.GetChannel() != null)
         client.GetChannel().Refresh();
 }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:5,代码来源:Channel.cs

示例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);
                                               });
            }
        }
开发者ID:Theoretical,项目名称:bunnyemu,代码行数:20,代码来源:Channel.cs


注:本文中的Bunny.Core.Client.GetChannel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。