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


C# Messages.PopString方法代码示例

本文整理汇总了C#中Messages.PopString方法的典型用法代码示例。如果您正苦于以下问题:C# Messages.PopString方法的具体用法?C# Messages.PopString怎么用?C# Messages.PopString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Messages的用法示例。


在下文中一共展示了Messages.PopString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Invoke

        public void Invoke(Session Session, Messages.PacketEvent Packet)
        {
            string Name = Packet.PopString();
            string Model = Packet.PopString();

            System.IOStreamer.AppendLine("Caption: {0}, Model: {1}", Name, Model);
        }
开发者ID:devMextur,项目名称:Tazqon,代码行数:7,代码来源:Navigator.cs

示例2: Invoke

 public void Invoke(Session Session, Messages.PacketEvent Packet)
 {
     switch (Packet.PopString())
     {
         case "Performance":
             switch (Packet.PopString())
             {
                 case "fps":
                     Session.UpdateFramesPerSecond(int.Parse(Packet.PopString()));
                     break;
             }
             break;
     }
 }
开发者ID:devMextur,项目名称:Tazqon,代码行数:14,代码来源:Global.cs

示例3: Invoke

        public void Invoke(Session Session, Messages.PacketEvent Packet)
        {
            RoomAdapter Adapter;

            if (System.HabboSystem.CharacterManager.GetCurrentRoom(Session.Character.Id, out Adapter))
            {
                RoomUnit Unit;

                if (Adapter.GetUnit(Session.Character.Id, out Unit))
                {
                    Adapter.WriteComposer(new ChatMessageComposer(Unit.Id, Packet.PopString()));
                }
            }
        }
开发者ID:devMextur,项目名称:Tazqon,代码行数:14,代码来源:Rooms.cs

示例4: Invoke

        public void Invoke(Session Session, Messages.PacketEvent Packet)
        {
            string Ticket = Packet.PopString();

            Character CharObj = System.HabboSystem.CharacterManager.Authenticate(Ticket);

            if (CharObj == null)
            {
                System.IOStreamer.AppendColor(ConsoleColor.Red);
                System.IOStreamer.AppendLine("Failed to Authenticate: {0}", Ticket);
                System.NetworkSocket.CloseSession(Session);
            }
            else
            {
                Session.UpdateCharacter(CharObj);
                Session.WriteComposer(new AuthenticationOKMessageComposer());
            }
        }
开发者ID:devMextur,项目名称:Tazqon,代码行数:18,代码来源:Handshake.cs

示例5: Invoke

        public void Invoke(Network.Session Session, Messages.PacketEvent Packet)
        {
            // TODO ? IF(!INROOM)

            if (Session.Character.Muted)
            {
                Session.WriteComposer(new ModMessageComposer("You are muted, only someone with an higher rank can unmute you."));
                return;
            }

            ICollection<int> Targets = Packet.PopCollection();

            string Message = Packet.PopString();

            foreach (int TargetId in Targets)
            {
                if (TargetId < 1 || TargetId == Session.Character.Id)
                {
                    continue;
                }

                if (System.HabboSystem.CharacterManager.GetStatus(TargetId) == CharacterStatus.Offline)
                {
                    continue;
                }

                if (!Session.Character.MessengerFriends.Contains(TargetId))
                {
                    Session.WriteComposer(new RoomInviteErrorComposer());
                    continue;
                }

                var TargetSession = System.NetworkSocket.GetSession(TargetId);

                if (TargetSession == null)
                {
                    Session.WriteComposer(new RoomInviteErrorComposer());
                    continue;
                }

                if (TargetSession.Character.Muted)
                {
                    Session.WriteComposer(new ModMessageComposer(string.Format("{0} is muted.", Session.Character.Username)));
                    continue;
                }

                TargetSession.WriteComposer(new RoomInviteComposer(Session.Character.Id, Message));
            }
        }
开发者ID:devMextur,项目名称:Tazqon,代码行数:49,代码来源:Messenger.cs


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