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


C# Session.SendPacket方法代码示例

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


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

示例1: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(2888);
            Response.WriteInt32(3);
            session.SendPacket(Response);

            Response = new Message(1401);
            Response.WriteInt32(3);
            Response.WriteString("1344031458870");
            Response.WriteString("http://habbo.hs.llnwd.net/basejump/693/BaseJump.swf");
            Response.WriteString("best");
            Response.WriteString("showAll");
            Response.WriteInt32(60);
            Response.WriteInt32(10);
            Response.WriteInt32(0);
            Response.WriteInt32(4);
            Response.WriteString("accessToken");
            Response.WriteString(session.Habbo.username + "-" + session.Habbo.figure);
            Response.WriteString("gameServerHost");
            Response.WriteString("ff-am.habbo.com");
            Response.WriteString("gameServerPort");
            Response.WriteString("30000");
            Response.WriteString("socketPolicyPort");
            Response.WriteString("30843");
            session.SendPacket(Response);
        }
开发者ID:habb0,项目名称:RevEmu,代码行数:26,代码来源:JoinQueue.cs

示例2: ParsePacket

        /// <summary>
        /// Handles Packet, for current user, and message event.
        /// </summary>
        /// <param name="gameclient">User of Packet</param>
        /// <param name="Message">Message for User</param>
        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(2121);
            session.SendPacket(Response);

            Response = new Message(294);
            Response.WriteString("model_f"); // Room Model
            Response.WriteInt32(1); // id ?
            session.SendPacket(Response);

            Response = new Message(3248);
            Response.WriteString("floor");
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(3248);
            Response.WriteString("landscape");
            Response.WriteString("0.0");
            session.SendPacket(Response);

            Response = new Message(3323);
            Response.WriteInt32(4);
            session.SendPacket(Response);

            Response = new Message(3840);
            session.SendPacket(Response);

            Response = new Message(1794);
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(369);
            Response.WriteInt32(142641);
            session.SendPacket(Response);
        }
开发者ID:ZakAmirz,项目名称:RevEmu,代码行数:40,代码来源:RoomLoading.cs

示例3: ParsePacket

 public void ParsePacket(Session session, Message message)
 {
     var response = new Message(544);
     response.WriteString("Team Rev|");
     response.WriteString("");
     session.SendPacket(response);
 }
开发者ID:habb0,项目名称:RevEmu,代码行数:7,代码来源:Alert.cs

示例4: Purchase

        /// <summary>
        /// Handels the purchase for an object from the catalog.
        /// </summary>
        public void Purchase(Session session, Message message)
        {
            // Get pageId from Client.
            int pageId = message.NextInt32();

            // Get itemId from Client.
            int itemId = message.NextInt32();

            // Create a instance of CatalogItemController using the purchased item Id.
            CatalogItemController purchasedItem = new CatalogItemController(itemId);

            // Simple check.
            if (purchasedItem.pageId != pageId) // If Page id do not match
                return;

            // Remove credits based on Item cost.
            session.Habbo.credits -= purchasedItem.credits;

            message = new Message(11); // Change to CreditUpdate id.

            // Updates users credits.
            message.WriteString("" + session.Habbo.credits + ".0");

            session.SendPacket(message);

            session.Habbo.SaveOrUpdate(session.Habbo);
        }
开发者ID:habb0,项目名称:RevEmu,代码行数:30,代码来源:Catalog.cs

示例5: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            /*
             * [LOG][CLIENT] > 2574: [0][0][0]D[10][0][0][0][1][0][0]^^[0]8b12104s05013s05014s05015b629b628442e26e378b9f8f18818bbaa
             * [LOG][CLIENT] > 3163: [0][0][0][6][12][[0][0][0][0]
             */

            var Response = new Message(2574);
            Response.WriteInt32(1);
            Response.WriteInt32(24158);
            Response.WriteString("b12104s05013s05014s05015b629b628442e26e378b9f8f18818bbaa");
            session.SendPacket(Response);

            Response = new Message(3163);
            Response.WriteInt32(0);
            session.SendPacket(Response);
        }
开发者ID:ZakAmirz,项目名称:RevEmu,代码行数:17,代码来源:InfoLoading.cs

示例6: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            //[LOG] > CLIENT ID: '785': [0][0][0][3] [0][0][0][0] [0][0][0][0] [0][0][0][1] [0][0][0][10]
            //[LOG] > CLIENT ID: '3721': [0][0][0]‰[0][0]*6[0]GET_SNOWWAR_TOKENS[0][0][0][1]

            var response = new Message(785);
            response.WriteInt32(0);
            response.WriteInt32(0);
            response.WriteInt32(1);
            response.WriteInt32(10);
            session.SendPacket(response);

            response = new Message(3721);
            response.WriteInt32(1);
            response.WriteString("GET_SNOWWAR_TOKENS");
            response.WriteInt32(1);
            session.SendPacket(response);
        }
开发者ID:habb0,项目名称:RevEmu,代码行数:18,代码来源:Games.cs

示例7: ParsePacket

 /// <summary>
 /// Handles Packet, for current user, and message event.
 /// </summary>
 /// <param name="Session">User of Packet</param>
 /// <param name="Message">Message for User</param>
 public void ParsePacket(Session session, Message message)
 {
     var Response = new Message(3298);
     Response.WriteInt32(session.Habbo.id);
     Response.WriteString(message.NextString());
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(-1);
     session.SendPacket(Response);
 }
开发者ID:habb0,项目名称:RevEmu,代码行数:15,代码来源:ShoutOnHotel.cs

示例8: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            string sso = message.NextString();
            //Application.Logging.WriteLine(string.Format("SSO Ticket: {0}", sso));

            var loadMyHabbo = new HabboDistributor().GetHabbo(sso);

            session.Habbo = loadMyHabbo;

            var response = new Message(SendHeaders.InitHotelView);
            session.SendPacket(response);
        }
开发者ID:ZakAmirz,项目名称:RevEmu,代码行数:12,代码来源:Authentication.cs

示例9: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            int FriendId = message.NextInt32();

            string theMessage = message.NextString();

            Console.WriteLine(FriendId);
            var Response = new Message(2582);
            Response.WriteInt32(FriendId);
            Response.WriteString(theMessage);
            Response.WriteString(string.Empty);
            session.SendPacket(Response);
        }
开发者ID:habb0,项目名称:RevEmu,代码行数:13,代码来源:SendMessage.cs

示例10: ParsePacket

        /// <summary>
        /// Handles Packet, for current user, and message event.
        /// </summary>
        /// <param name="gameclient">User of Packet</param>
        /// <param name="Message">Message for User</param>
        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(2348);
            session.SendPacket(Response);

            Response = new Message(1399);
            Response.WriteString("model_f"); // Room Model
            Response.WriteInt32(1); // id ?
            session.SendPacket(Response);

            Response = new Message(2771);
            Response.WriteString("wallpaper"); // Wallpaper
            Response.WriteString("110"); // Height / Width
            session.SendPacket(Response);

            Response = new Message(2771);
            Response.WriteString("floor"); // Floor
            Response.WriteString("110"); // Height / Width
            session.SendPacket(Response);

            Response = new Message(3998);
            Response.WriteInt32(4);
            session.SendPacket(Response);

            Response = new Message(3083);
            Response.WriteInt32(2);
            Response.WriteBool(false);
            session.SendPacket(Response);

            Response = new Message(831);
            session.SendPacket(Response);

            Response = new Message(2771);
            Response.WriteString("landscape"); // Landscape
            Response.WriteString("10.0"); // Height / Width
            session.SendPacket(Response);

            Response = new Message(2101);
            Response.WriteString("-1");
            session.SendPacket(Response);
        }
开发者ID:habb0,项目名称:RevEmu,代码行数:46,代码来源:EnterRoomEvent.cs

示例11: ParsePacket

 public void ParsePacket(Session session, Message Message)
 {
     var Response = new Message(SendHeaders.InitClubStatus);
     Response.WriteString(Message.NextString());
     Response.WriteInt32(10);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(1);
     Response.WriteBool(false);
     Response.WriteBool(true);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     Response.WriteInt32(0);
     session.SendPacket(Response);
 }
开发者ID:habb0,项目名称:RevEmu,代码行数:16,代码来源:InitClub.cs

示例12: ParsePacket

 public void ParsePacket(Session session, Message message)
 {
     var Uinfo = new Message(3744);
     Uinfo.WriteInt32(session.Habbo.id); // id perhaps
     Uinfo.WriteString(session.Habbo.username); // names
     Uinfo.WriteInt32(4); // registered minutes ago
     Uinfo.WriteInt32(8); // last login minutes ago
     Uinfo.WriteBool(true); // is online, NO doubt
     Uinfo.WriteInt32(1); // cfhs
     Uinfo.WriteInt32(2); // abusive cfhs
     Uinfo.WriteInt32(3); // cautions
     Uinfo.WriteInt32(4); // bans
     Uinfo.WriteString("3"); // purchase shit?
     Uinfo.WriteInt32(3); // no idea yet
     Uinfo.WriteInt32(5); // amount banned accounts lol
     Uinfo.WriteString("666"); // some shit above banned accounts
     session.SendPacket(Uinfo);
 }
开发者ID:habb0,项目名称:RevEmu,代码行数:18,代码来源:UserInfo.cs

示例13: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            var response = new Message(1263);
            response.WriteInt32(326494);
            response.WriteString("[µ] Train Station [µ] NYC [µ]");
            response.WriteInt32(55701607);
            response.WriteString("b22234s9723416fe55795537635b44781e732427990d");
            response.WriteInt32(14);
            response.WriteInt32(1);
            response.WriteInt32(0);
            response.WriteInt32(1);
            response.WriteString("JakeSS");
            response.WriteString(
                "hr-3163-61.hd-3091-6.ch-255-64.lg-3023-110.sh-3068-64-64.ha-1022-110.ea-3226-110.fa-1205-110.ca-3176-93-93.cc-3075-110.cp-3204");
            response.WriteString("Mar 17, 2012");

            response.WriteInt32(0);
            response.WriteInt32(0);
            response.WriteString(string.Empty);
            session.SendPacket(response);
        }
开发者ID:ZakAmirz,项目名称:RevEmu,代码行数:21,代码来源:GroupMembers.cs

示例14: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            var Response = new Message(3240);

            try
            {
                Response.WriteInt32(5);
                Response.WriteString("");
                Response.WriteInt32(1);

                Response.WriteInt32(1);
                Response.WriteBool(false);
                Response.WriteString("Best Room Ever");
                Response.WriteBool(true);
                Response.WriteInt32(session.Habbo.id);
                Response.WriteString(session.Habbo.username);
                Response.WriteInt32(int.Parse("0"));
                Response.WriteInt32(0);
                Response.WriteInt32(2500);
                Response.WriteString("Zak's gay.");
                Response.WriteInt32(0);
                //Response.WriteInt32((bool.Parse(room.allowWalkthrough)) ? 1 : 0);
                Response.WriteInt32(1);
                Response.WriteInt32(0);
                Response.WriteInt32(0);
                Response.WriteInt32(0); // No group id.
                Response.WriteString("");
                Response.WriteString("");
                Response.WriteString("");

                Response.WriteInt32(0);
                //for (int i = 0; i < room.tags.Count(); i++)
                //Response.WriteInt32(room.tags[i]);

                Response.WriteInt32(0);
                Response.WriteInt32(0);
                Response.WriteInt32(0);
                Response.WriteInt32(0);
                Response.WriteBool(true);
                Response.WriteBool(true);

                //foreach (RoomSql room in RoomSql.GetRooms(session.Habbo.id))
                //{
                    /*Response.WriteInt32(room.id);
                    Response.WriteBool(false);
                    Response.WriteString(room.caption);
                    Response.WriteBool(true);
                    Response.WriteInt32(session.Habbo.id);
                    Response.WriteString(session.Habbo.username);
                    Response.WriteInt32(int.Parse(room.state));
                    Response.WriteInt32(0);
                    Response.WriteInt32(room.usersMax);
                    Response.WriteString(room.description);
                    Response.WriteInt32(0);
                    //Response.WriteInt32((bool.Parse(room.allowWalkthrough)) ? 1 : 0);
                    Response.WriteInt32(1);
                    Response.WriteInt32(room.score);
                    Response.WriteInt32(room.category);
                    Response.WriteInt32(0); // No group id.
                    Response.WriteString("");
                    Response.WriteString("");
                    Response.WriteString("");

                    Response.WriteInt32(room.tags.Count());
                    //for (int i = 0; i < room.tags.Count(); i++)
                        //Response.WriteInt32(room.tags[i]);

                    Response.WriteInt32(0);
                    Response.WriteInt32(0);
                    Response.WriteInt32(0);
                    Response.WriteInt32(0);
                    Response.WriteBool(true);
                    Response.WriteBool(true);*/
                //}
                Response.WriteBool(false);
                session.SendPacket(Response);
            }

            catch (Exception e)
            {
                Console.WriteLine("Own Rooms Error: " + e);
            }
        }
开发者ID:habb0,项目名称:RevEmu,代码行数:83,代码来源:OwnRooms.cs

示例15: ParsePacket

        public void ParsePacket(Session session, Message message)
        {
            Console.Title = string.Format("Revolution Emulator | Invoked on Revision: {0}, Packets loaded!", session.ReleaseBuild);

            var Response = new Message(SendHeaders.InitUser);
            Response.WriteInt32(session.Habbo.id); //id
            Response.WriteString(session.Habbo.username); //username
            Response.WriteString(session.Habbo.figure); //look
            Response.WriteString(session.Habbo.gender.ToUpper()); //gender M/F
            Response.WriteString(session.Habbo.motto);
            Response.WriteString(session.Habbo.username); //real name????
            Response.WriteBool(true);
            Response.WriteInt32(0); // Respect
            Response.WriteInt32(3); // Daily Respect Points
            Response.WriteInt32(3); // Daily Pet Respect Points
            Response.WriteBool(true);
            Response.WriteString("31-07-2012 12:28:40");
            Response.WriteBool(false);
            Response.WriteBool(false);
            session.SendPacket(Response);

            Response = new Message(2967);
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(416);
            Response.WriteInt32(90);
            session.SendPacket(Response);

            Response = new Message(2594);
            Response.WriteInt32(25000);
            session.SendPacket(Response);

            Response = new Message(3841);
            Response.WriteInt32(0);
            Response.WriteInt32(-1);
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(3786);
            Response.WriteString("100a65a9efd436dc996cbss6");
            session.SendPacket(Response);
            //List<FriendController> friends = new FriendController(session.Habbo.id).GetMyFriends(session.Habbo.id);

            //session.SendAlert("Zak's a faggot");

            Response = new Message(SendHeaders.FriendBarInit);
            Response.WriteInt32(100);
            Response.WriteInt32(100);
            Response.WriteInt32(200);
            Response.WriteInt32(300);

            Response.WriteInt32(0); //count friend group

            Response.WriteInt32(1); //Count friends

            HabboController friendData = new HabboController(2);
            Response.WriteInt32(friendData.id);
            Response.WriteString(friendData.username); //Username
            Response.WriteInt32(1); //?
            Response.WriteBool(true); //Online/Offline
            Response.WriteBool(false); //InRoom
            Response.WriteString(friendData.figure);
            Response.WriteInt32(2);
            Response.WriteString(friendData.motto);
            Response.WriteString("Super Admin");
            Response.WriteString("22-07-2012");
            Response.WriteBool(false);

            //var FriendbarTwo = new HabboController(2);
            /*for (int i = 0; i < friends.Count; i++)
            {
                HabboController friendData = new HabboController(i);
                Response.WriteInt32(friendData.id);
                Response.WriteString(friendData.username); //Username
                Response.WriteInt32(1); //?
                Response.WriteBool(true); //Online/Offline
                Response.WriteBool(false); //InRoom
                Response.WriteString(friendData.figure);
                Response.WriteInt32(2);
                Response.WriteString(friendData.motto);
                Response.WriteString("Super Admin");
                Response.WriteString("22-07-2012");
                Response.WriteBool(false);
            }*/

            Response.WriteInt32(100);
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(2026);
            Response.WriteInt32(0);
            Response.WriteInt32(0);
            session.SendPacket(Response);

            Response = new Message(3841);
            Response.WriteInt32(0);
            Response.WriteInt32(-1);
            Response.WriteInt32(0);
            session.SendPacket(Response);
//.........这里部分代码省略.........
开发者ID:habb0,项目名称:RevEmu,代码行数:101,代码来源:InitUserInfo.cs


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