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


C# ClientMessage.PopFixedString方法代码示例

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


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

示例1: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null)
			{
				RoomItem class2 = @class.method_28(Event.PopWiredUInt());
				if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
				{
                    string Color = Event.PopFixedString();
                    string Text = Event.PopFixedString();
                    if (@class.method_26(Session) || Text.StartsWith(class2.ExtraData))
					{
                        switch (Color)
                        {
                            case "FFFF33":
                            case "FF9CFF":
                            case "9CCEFF":
                            case "9CFF9C":
                                break;
                            default:
                                return; // invalid color
                        }
                        class2.ExtraData = Color + " " + Text;
						class2.UpdateState(true, true);
						
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:29,代码来源:SetItemDataMessageEvent.cs

示例2: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Event.PopWiredInt32();
     string str = Event.PopFixedString();
     string str2 = Event.PopFixedString();
     Session.ClientVar = str;
    // Console.WriteLine(Session.ClientVar);
 }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:8,代码来源:ClientVariableMessageEvent.cs

示例3: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            string AuthTicket = Event.PopFixedString();
            string PrivateHost = Event.PopFixedString();

            using (DatabaseClient dbClient = Essential.GetDatabase().GetClient())
			{
                // Check auth token

                dbClient.AddParamWithValue("token", AuthTicket);

                int UserId = dbClient.ReadInt32("SELECT user_id FROM basejump_auth_tokens WHERE token = @token LIMIT 1");

                if (dbClient.ReadInt32("SELECT COUNT(id) FROM users WHERE id = '" + UserId + "' LIMIT 1") == 1)
                {
                    Session.Basejump_UserId = UserId;

                   if (dbClient.ReadInt32("SELECT COUNT(id) FROM basejump_users_powerups WHERE user_id = '" + UserId + "' LIMIT 1") == 0)
                   {
                       dbClient.ExecuteQuery("INSERT INTO `basejump_users_powerups` (`user_id`) VALUES ('" + UserId + "')");
                   }

                }
                else
                {
                    // Token not found :(
                    return;
                }
            }



            ServerMessage LoggedInSuccessfully = new ServerMessage(Outgoing.LoginFastFood);
            Session.SendMessage(LoggedInSuccessfully);
            

            Console.WriteLine("Logged to BaseJump game with ticket: " + AuthTicket);

      /*      ServerMessage Localizations = new ServerMessage(13);
            Localizations.AppendInt32(1);
            Localizations.AppendString("devtest");
            Localizations.AppendString("devtest2");
            Session.SendMessage(Localizations);


            ServerMessage Credits = new ServerMessage(16);
            Credits.AppendInt32(1000);
            Session.SendMessage(Credits);
            */
         

        }
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:52,代码来源:LoginToFastFood.cs

示例4: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			int num = Event.PopWiredInt32();
			List<uint> list = new List<uint>();
			for (int i = 0; i < num; i++)
			{
				list.Add(Event.PopWiredUInt());
			}
			string text = Event.PopFixedString();
			
				text = Essential.DoFilter(text, true, false);
				text = ChatCommandHandler.ApplyFilter(text);
                ServerMessage Message = new ServerMessage(Outgoing.InstantInvite); // Update
				Message.AppendUInt(Session.GetHabbo().Id);
				Message.AppendStringWithBreak(text);
				foreach (uint current in list)
				{
					if (Session.GetHabbo().GetMessenger().method_9(Session.GetHabbo().Id, current))
					{
						GameClient @class = Essential.GetGame().GetClientManager().GetClient(current);
						if (@class == null)
						{
							break;
						}
						@class.SendMessage(Message);
					}
				}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:28,代码来源:SendRoomInviteMessageEvent.cs

示例5: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room Room = Session.GetHabbo().CurrentRoom;
            if (Room != null)
			{
				string string_ = Event.PopFixedString();
                RoomUser @class = Room.method_56(string_);
				if (@class != null)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (!Session.GetHabbo().list_2.Contains(uint_))
					{
						Session.GetHabbo().list_2.Add(uint_);
						using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"INSERT INTO user_ignores(user_id, ignore_id) VALUES (",
								Session.GetHabbo().Id,
								", ",
								uint_,
								");"
							}));
						}
                        ServerMessage Message = new ServerMessage(Outgoing.UpdateIgnoreStatus); // Updated
                        Message.AppendInt32(1);
                        Message.AppendString(string_);
						Session.SendMessage(Message);
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:32,代码来源:IgnoreUserMessageEvent.cs

示例6: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().GetMessenger() != null)
			{
				Session.SendMessage(Session.GetHabbo().GetMessenger().method_24(Event.PopFixedString()));
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:7,代码来源:HabboSearchMessageEvent.cs

示例7: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.method_56(string_);
				if (@class != null)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (Session.GetHabbo().list_2.Contains(uint_))
					{
						Session.GetHabbo().list_2.Remove(uint_);
						using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"DELETE FROM user_ignores WHERE user_id = ",
								Session.GetHabbo().Id,
								" AND ignore_id = ",
								uint_,
								" LIMIT 1;"
							}));
						}
                        ServerMessage Message = new ServerMessage(Outgoing.UpdateIgnoreStatus); // Updated
						Message.AppendInt32(3);
                        Message.AppendString(string_);
						Session.SendMessage(Message);
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:32,代码来源:UnignoreUserMessageEvent.cs

示例8: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.method_26(Session))
			{
                int num = Event.PopWiredInt32();
                uint Data = Event.PopWiredUInt();
                string BrandData = "state" + Convert.ToChar(9) + "0";
                for (int i = 1; i <= Data; i++)
                {
                    BrandData = BrandData + Convert.ToChar(9) + Event.PopFixedString();
                }
                using (DatabaseClient class2 = Essential.GetDatabase().GetClient())
                {
                    class2.AddParamWithValue("extradata", BrandData);
                    class2.ExecuteQuery("UPDATE items_extra_data SET extra_data = @extradata WHERE item_id = '" + num + "' LIMIT 1");
                }
                /*ServerMessage Message = new ServerMessage();
                Message.Init(Outgoing.ObjectDataUpdate); // Update
                Message.AppendStringWithBreak(num.ToString());
                Message.AppendInt32(0);
                Message.AppendInt32(1);
                Message.AppendStringWithBreak(BrandData);
                @class.SendMessage(Message, null);*/
                @class.method_28((uint)num).ExtraData = BrandData;
                @class.method_79(Session, @class.method_28((uint)num), @class.method_28((uint)num).GetX, @class.method_28((uint)num).Int32_1, @class.method_28((uint)num).int_3, false, false, true);
                @class.method_28((uint)num).UpdateState(true, false, true);
				}
			
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:30,代码来源:SetObjectDataMessageEvent.cs

示例9: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			Room @class = Essential.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.method_26(Session))
			{
				string string_ = Event.PopFixedString();
                bool canletin = Event.PopWiredBoolean();
				GameClient class2 = Essential.GetGame().GetClientManager().GetClientByHabbo(string_);
				if (class2 != null && class2.GetHabbo() != null && class2.GetHabbo().bool_6 && class2.GetHabbo().uint_2 == Session.GetHabbo().CurrentRoomId)
				{
					if (canletin)
					{
						class2.GetHabbo().bool_5 = true;
                        ServerMessage Message4 = new ServerMessage(Outgoing.FlatAccessible); // Updated
                        Message4.AppendString("");
                        class2.SendMessage(Message4);
					}
					else
					{
                        ServerMessage Message5 = new ServerMessage(Outgoing.DoorBellNoPerson); // Updated
                        Message5.AppendString("");
                        class2.SendMessage(Message5);
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:26,代码来源:LetUserInMessageEvent.cs

示例10: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
             ServerMessage Message = new ServerMessage(Outgoing.PetRace); //Rootkit
             string PetType = Event.PopFixedString();
             Message.AppendStringWithBreak(PetType);
             int petid = int.Parse(PetType.Substring(PetType.IndexOf('t'), PetType.Length - PetType.IndexOf('t')).Replace("t",""));
            if (PetRace.RaceGotRaces(petid))
            {
                List<PetRace> Races = PetRace.GetRacesForRaceId(petid);
                Message.AppendInt32(Races.Count);
                foreach (PetRace r in Races)
                {
                    Message.AppendInt32(petid);
                    Message.AppendInt32(r.Color1);
                    Message.AppendInt32(r.Color2);
                    Message.AppendBoolean(r.Has1Color);
                    Message.AppendBoolean(r.Has2Color); 
                }
            }
            else
            {
                Message.AppendInt32(0);
            }
				Session.SendMessage(Message);
			}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:25,代码来源:GetSellablePetBreedsEvent.cs

示例11: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			string text = Essential.FilterString(Event.PopFixedString());
			if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null && Session.GetHabbo().PassedSafetyQuiz)
			{
                Session.GetHabbo().CheckForUnmute();
				if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
				{
                    ServerMessage Message = new ServerMessage(Outgoing.InstantChat);
					Message.AppendUInt(0u);
					Message.AppendString(Session.GetHabbo().Username + ": " + text);
                    Message.AppendString(Essential.GetUnixTimestamp() + string.Empty);
					Essential.GetGame().GetClientManager().SendToStaffs(Session, Message, false);
				}
				else
				{
					if (num == 0u)
					{
                       /* ServerMessage Message2 = new ServerMessage(1133);
						Message2.AppendInt32(4);
						Message2.AppendUInt(0u);
						Session.SendMessage(Message2);*/
					}
					else
					{
                        if (Session != null && Session.GetHabbo() != null)
                        {
                            Session.GetHabbo().GetMessenger().method_18(num, text);
                        }
					}
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:34,代码来源:SendMsgMessageEvent.cs

示例12: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			int int_ = Event.PopWiredInt32();
			int int_2 = Event.PopWiredInt32();
			string string_ = Event.PopFixedString();
			int int_3 = Event.PopWiredInt32();
			Session.SendMessage(Essential.GetGame().GetCatalog().GetMarketplace().GetMarketPlaceOffers(int_, int_2, string_, int_3,Session));
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:8,代码来源:GetOffersMessageEvent.cs

示例13: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
            string PetName = Event.PopFixedString();
            ServerMessage Message = new ServerMessage(Outgoing.CheckPetName); // Updated
            Message.AppendInt32(Essential.GetGame().GetCatalog().ValidPetName(PetName) ? 0 : 2);
            Message.AppendString(PetName);
			Session.SendMessage(Message);
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:8,代码来源:ApproveNameMessageEvent.cs

示例14: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().OwnedRooms.Count <= ServerConfiguration.RoomUserLimit)
			{
				string Name = Essential.FilterString(Event.PopFixedString());
				string Model = Event.PopFixedString();
			//	Event.PopFixedString();
                RoomData NewRoom = Essential.GetGame().GetRoomManager().CreateRoom(Session, Name, Model);
                if (NewRoom != null)
				{
                    ServerMessage Message = new ServerMessage(Outgoing.OnCreateRoomInfo); // Update
                    Message.AppendUInt(NewRoom.Id);
                    Message.AppendStringWithBreak(NewRoom.Name);
					Session.SendMessage(Message);
				}
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:17,代码来源:CreateFlatMessageEvent.cs

示例15: Handle

		public void Handle(GameClient Session, ClientMessage Event)
		{
			string text = Event.PopFixedString();
			if (Session != null && Session.GetHabbo() != null && text != Essential.smethod_0(Session.GetHabbo().Username))
			{
                Session.SendMessage(Essential.GetGame().GetNavigator().SerializeRoomSearch(text));
			}
		}
开发者ID:RootkitR,项目名称:Essential-5.1,代码行数:8,代码来源:RoomTextSearchMessageEvent.cs


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