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


C# Message.NextInt32方法代码示例

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


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

示例1: UNK1

        public static void UNK1(Message Message, Session Session)
        {
            bool b = Message.NextBool();
            int i = Message.NextInt32();

            fuseResponse.New(3306);
            fuseResponse.Append<bool>(b);
            fuseResponse.Append<int>(i);
            //fuseResponse.Send(Session);

            fuseResponse.New(3713);
            fuseResponse.Append<string>("30-09-2012 16:17:34");
            fuseResponse.Append<int>(78151);
            //fuseResponse.Send(Session);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:15,代码来源:Others.cs

示例2: Move

        public static void Move(Message Msg, Session Session)
        {
            if (Session.User.RoomUser.IsWalking)
            {
                Session.MoveThread.Abort();
                Session.MoveThread = null;
                Session.User.RoomUser.IsWalking = false;
            }

            int X = Msg.NextInt32();
            int Y = Msg.NextInt32();

            if (X == Session.Room.Model.DoorX && Y == Session.Room.Model.DoorY)
            {
                fuseResponse.New(Opcodes.OpcodesOut.SendUserOutofRoom);
                Session.Room.SendData(fuseResponse);

                Session.MoveThread.Abort();
                Session.MoveThread = null;
                return;
            }

            Session.User.RoomUser.GoalX = X;
            Session.User.RoomUser.GoalY = Y;

            Session.MoveThread = new Thread(new ParameterizedThreadStart(OnWalk));
            Session.MoveThread.Start(Session);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:28,代码来源:Rooms.cs

示例3: Talk

        public static void Talk(Message Msg, Session Session)
        {
            string Message = Msg.NextString();
            int Type = Msg.NextInt32(); // Never knew you could do bot things
            int Color = Msg.NextInt32();

            if (Message.StartsWith("b: "))
            {
                Type = 2;
                Message = Message.Replace("b: ", "");
            }
            else if (Message.StartsWith("n: "))
            {
                Type = 1;
                Message = Message.Replace("n: ", "");
            }

            //[0][0][0]v[0][0][0][0][0][3]hey[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
            fuseResponse.New(Opcodes.OpcodesOut.SendRoomChat);
            fuseResponse.Append<int>(Session.User.ID);
            fuseResponse.Append<string>(Message);
            fuseResponse.Append<int>(Chat.GetChatEmoticon(Message));
            fuseResponse.Append<int>(Type); // Type (0 = normal, 1 = notification, 2 = BOT, 3 = colored)
            fuseResponse.Append<int>(0);
            fuseResponse.Append<int>(Color); // ?
            Session.Room.SendData(fuseResponse);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:27,代码来源:Rooms.cs

示例4: GetRoomUserTags

        public static void GetRoomUserTags(Message Message, Session Session)
        {
            int UserID = Message.NextInt32();

            var user = (from i in Engine.RoomsLoaded[Session.Room.ID] where i.User.ID == UserID select i);
            var Ses = user.First();
            //??
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:8,代码来源:Rooms.cs

示例5: GetRoomUserBadges

        public static void GetRoomUserBadges(Message Message, Session Session)
        {
            int UserID = Message.NextInt32();

            var user = (from i in Engine.RoomsLoaded[Session.Room.ID] where i.User.ID == UserID select i);
            var Ses = user.First();
            var Wearing = (from i in Ses.User.Emblems.getEmblems() where i.Value.SlotID > 0 select i.Value);

            fuseResponse.New(Opcodes.OpcodesOut.SendRoomUserBadges);
            fuseResponse.Append<int>(UserID);

            fuseResponse.Append<int>(Wearing.Count());

            foreach (var Wear in Wearing)
            {
                fuseResponse.Append<int>(Wear.SlotID);
                fuseResponse.Append<string>(Wear.Badge);
            }

            fuseResponse.Send(Session);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:21,代码来源:Rooms.cs

示例6: BeginEnterRoom

        public static void BeginEnterRoom(Message Msg, Session Session)
        {
            int ID = Msg.NextInt32();
            var Rooms = FluentRooms.GetById(ID);
            var Room = Rooms[0];
            string Password = Msg.NextString();

            fuseResponse.New(Opcodes.OpcodesOut.SendRoomInitialize);
            fuseResponse.Send(Session);

            if (Room.State == 1)
            {
                fuseResponse.New(Opcodes.OpcodesOut.SendUserOutofRoom);
                fuseResponse.Send(Session);

                fuseResponse.New(Opcodes.OpcodesOut.SendDoorbellNoAnswer);
                fuseResponse.Send(Session);
            }

            if (Room.State == 2)
            {
                if (Password != Room.Password)
                {
                    fuseResponse.New(Opcodes.OpcodesOut.SendUserOutofRoom);
                    fuseResponse.Send(Session);

                    fuseResponse.New(Opcodes.OpcodesOut.SendWrongPassword);
                    fuseResponse.Append<int>(-100002);
                    fuseResponse.Send(Session);
                }
            }

            Session.Room = Room;

            fuseResponse.New(Opcodes.OpcodesOut.SendRoomModelInfo);
            fuseResponse.Append<string>(Session.Room.Model_Name);
            fuseResponse.Append<uint>(Session.Room.ID);
            fuseResponse.Send(Session);

            fuseResponse.New(Opcodes.OpcodesOut.SendRoomDecoration);
            fuseResponse.Append<string>("landscape");
            fuseResponse.Append<string>("0.0");
            fuseResponse.Send(Session);

            if (Session.Room.Wallpaper != "0.0")
            {
                fuseResponse.New(Opcodes.OpcodesOut.SendRoomDecoration);
                fuseResponse.Append<string>("wallpaper");
                fuseResponse.Append<string>(Session.Room.Wallpaper);
                fuseResponse.Send(Session);
            }

            if (Session.Room.Floor != "0.0")
            {
                fuseResponse.New(Opcodes.OpcodesOut.SendRoomDecoration);
                fuseResponse.Append<string>("floor");
                fuseResponse.Append<string>(Session.Room.Floor);
                fuseResponse.Send(Session);
            }

            if (Session.Room.Owner == Session.User.Username)
            {
                fuseResponse.New(Opcodes.OpcodesOut.SendRoomUserRightLevel);
                fuseResponse.Append<int>(4);
                fuseResponse.Send(Session);

                fuseResponse.New(Opcodes.OpcodesOut.SendRoomOwnerShip);
                fuseResponse.Send(Session);
            }
            else
            {
                fuseResponse.New(Opcodes.OpcodesOut.SendRoomUserRightLevel);
                fuseResponse.Append<int>(0);
                fuseResponse.Send(Session);
            }

            fuseResponse.New(Opcodes.OpcodesOut.SendRoomScore);
            fuseResponse.Append<int>(Session.Room.Score);
            fuseResponse.Append<bool>((Session.Room.Owner == Session.User.Username) ? false : Session.User.RatedRooms.Contains(ID) ? false : true);
            fuseResponse.Send(Session);

            fuseResponse.New(Opcodes.OpcodesOut.SendRoomEventData);
            fuseResponse.Append<string>("-1");
            fuseResponse.Send(Session);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:85,代码来源:Rooms.cs

示例7: GetVIPBuyDialog

        public static void GetVIPBuyDialog(Message Message, Session Session)
        {
            fuseResponse.New(Opcodes.OpcodesOut.SendVIPBuyDialog);
            fuseResponse.Append<int>(2);

            fuseResponse.Append<int>(1);
            fuseResponse.Append<string>("HABBO_CLUB_VIP_1_MONTH");
            fuseResponse.Append<int>(25);
            fuseResponse.Append<int>(0);
            fuseResponse.Append<int>(0);
            fuseResponse.Append<bool>(true);
            fuseResponse.Append<int>(1);
            fuseResponse.Append<int>(31);
            fuseResponse.Append<int>(31);
            fuseResponse.Append<int>(2012);
            fuseResponse.Append<int>(11);
            fuseResponse.Append<int>(7);

            fuseResponse.Append<int>(2);
            fuseResponse.Append<string>("HABBO_CLUB_VIP_3_MONTHS");
            fuseResponse.Append<int>(25);
            fuseResponse.Append<int>(0);
            fuseResponse.Append<int>(0);
            fuseResponse.Append<bool>(true);
            fuseResponse.Append<int>(1);
            fuseResponse.Append<int>(31);
            fuseResponse.Append<int>(31);
            fuseResponse.Append<int>(2012);
            fuseResponse.Append<int>(11);
            fuseResponse.Append<int>(7);

            fuseResponse.Append<int>(Message.NextInt32());
            fuseResponse.Send(Session);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:34,代码来源:Catalog.cs

示例8: GetShopPage

        public static void GetShopPage(Message Msg, Session Session)
        {
            int ID = Msg.NextInt32();
            var Page = Engine.GetHabboHotel.getCatalogueManager.Pages[ID];

            if (!Page.has_content)
                return;

            fuseResponse.New(Opcodes.OpcodesOut.SendShopPage);
            fuseResponse.Append<int>(ID);
            fuseResponse.Append<string>(Page.layout);

            fuseResponse.Append<int>(Page.layout_images.Split(';').Count());

            var ImgEnum = Page.layout_images.Split(';').GetEnumerator();

            while (ImgEnum.MoveNext())
            {
                fuseResponse.Append<string>(ImgEnum.Current.ToString());
            }

            fuseResponse.Append<int>(Page.layout_texts.Split(';').Count());

            var TxtEnum = Page.layout_texts.Split(';').GetEnumerator();

            while (TxtEnum.MoveNext())
            {
                fuseResponse.Append<string>(TxtEnum.Current.ToString());
            }

            var Items = (from i in Engine.GetHabboHotel.getCatalogueManager.Items where i.Value.pageid == Page.id select i.Value);
            var ItemEnum = Items.GetEnumerator();

            fuseResponse.Append<int>(Items.Count());

            while (ItemEnum.MoveNext())
            {
                ((catalogitems)ItemEnum.Current).Serialize(fuseResponse);
            }

            fuseResponse.Append<int>(-1);
            fuseResponse.Append<bool>(false);
            fuseResponse.Send(Session);
        }
开发者ID:habb0,项目名称:FerriEmulator,代码行数:44,代码来源:Catalog.cs


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