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


C# Messages.PopInt32方法代码示例

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


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

示例1: Invoke

        public void Invoke(Session Session, Messages.PacketEvent Packet)
        {
            int A = Packet.PopInt32();
            int B = Packet.PopInt32();

            Session.UpdateLatencyPing(((A + B) / 2));
        }
开发者ID:devMextur,项目名称:Tazqon,代码行数:7,代码来源:Global.cs

示例2: 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))
                {
                    var DanceId = Packet.PopInt32();

                    Unit.Dance(DanceId);
                    Unit.Activate();

                    Adapter.WriteComposer(new DanceMessageComposer(Unit.Id, DanceId));
                }
            }
        }
开发者ID:devMextur,项目名称:Tazqon,代码行数:19,代码来源:Rooms.cs

示例3: Invoke

 public void Invoke(Session Session, Messages.PacketEvent Packet)
 {
     Session.Character.UpdateSoundSettings(Packet.PopInt32());
 }
开发者ID:devMextur,项目名称:Tazqon,代码行数:4,代码来源:Characters.cs

示例4: Invoke

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

            var TargetId = Packet.PopInt32();

             /* ChatErrorId(s)
             * 3 = Friend Muted x
             * 4 = You are muted x
             * 5 = offline x
             * 6 = not friend x
             * 7 = friend is busy
             * */

            if (TargetId < 1 || TargetId == Session.Character.Id)
            {
                return;
            }

            if (Session.Character.Muted)
            {
                Session.WriteComposer(new InstantMessageErrorComposer(4, TargetId));
                return;
            }

            if (!Session.Character.MessengerFriends.Contains(TargetId))
            {
                Session.WriteComposer(new InstantMessageErrorComposer(6, TargetId));
                return;
            }

            if (System.HabboSystem.CharacterManager.GetStatus(TargetId) == CharacterStatus.Offline)
            {
                Session.WriteComposer(new InstantMessageErrorComposer(5, TargetId));
                return;
            }

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

            if (TargetSession == null)
            {
                Session.WriteComposer(new InstantMessageErrorComposer(5, TargetId));
                return;
            }

            if (TargetSession.Character.Muted)
            {
                Session.WriteComposer(new InstantMessageErrorComposer(3, TargetId));
                return;
            }

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


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