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


C# ClientMessage.PopFixedString方法代码示例

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


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

示例1: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.CheckRights(Session))
			{
				uint num = Event.PopWiredUInt();
				string a = Event.PopFixedString().ToUpper();
				string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
				text = text.Replace("hd-99999-99999", "");
				text += ".";
				RoomItem class2 = @class.Hashtable_0[num] as RoomItem;
				if (class2.ExtraData.Contains(','))
				{
					class2.Extra1 = class2.ExtraData.Split(new char[]
					{
						','
					})[0];
					class2.Extra2 = class2.ExtraData.Split(new char[]
					{
						','
					})[1];
				}
				if (a == "M")
				{
					class2.Extra1 = text;
				}
				else
				{
					class2.Extra2 = text;
				}
				class2.ExtraData = class2.Extra1 + "," + class2.Extra2;
				class2.UpdateState(true, true);
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:34,代码来源:SetClothingChangeDataMessageEvent.cs

示例2: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				uint uint_ = Event.PopWiredUInt();
				RoomItem item = room.GetItem(uint_);
				string text = item.GetBaseItem().InteractionType.ToLower();
				if (text != null && (text == "wf_cnd_trggrer_on_frn" || text == "wf_cnd_furnis_hv_avtrs" || text == "wf_cnd_has_furni_on"))
				{
					Event.PopWiredBoolean();
					Event.PopFixedString();
					item.Extra1 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
					item.Extra1 = item.Extra1.Substring(0, item.Extra1.Length - 1);
					Event.ResetPointer();
					item = room.GetItem(Event.PopWiredUInt());
					Event.PopWiredBoolean();
					Event.PopFixedString();
					int num = Event.PopWiredInt32();
					item.Extra2 = "";
					for (int i = 0; i < num; i++)
					{
						item.Extra2 = item.Extra2 + "," + Convert.ToString(Event.PopWiredUInt());
					}
					if (item.Extra2.Length > 0)
					{
						item.Extra2 = item.Extra2.Substring(1);
					}
				}
			}
			catch
			{
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:34,代码来源:UpdateConditionMessageEvent.cs

示例3: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			int PageId = Event.PopWiredInt32();
			uint ItemId = Event.PopWiredUInt();
			string ExtraData = Event.PopFixedString();
			string GiftUser = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			string GiftMessage = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			PhoenixEnvironment.GetGame().GetCatalog().HandlePurchase(Session, PageId, ItemId, ExtraData, true, GiftUser, GiftMessage, true);
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:9,代码来源:PurchaseFromCatalogAsGiftEvent.cs

示例4: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			string text = Event.PopFixedString();
			ServerMessage Message = new ServerMessage(7u);
			Message.AppendStringWithBreak(text.ToLower());
			if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip"))
			{
				double num = (double)Session.GetHabbo().GetSubscriptionManager().GetSubscription("habbo_vip").ExpireTime;
				double num2 = num - PhoenixEnvironment.GetUnixTimestamp();
				int num3 = (int)Math.Ceiling(num2 / 86400.0);
				int num4 = num3 / 31;
				if (num4 >= 1)
				{
					num4--;
				}
				Message.AppendInt32(num3 - num4 * 31);
				Message.AppendBoolean(true);
				Message.AppendInt32(num4);
				Message.AppendBoolean(true);
				Message.AppendBoolean(true);
				Message.AppendBoolean(Session.GetHabbo().Vip);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
			}
			else
			{
				if (Session.GetHabbo().GetSubscriptionManager().HasSubscription(text))
				{
					double num = (double)Session.GetHabbo().GetSubscriptionManager().GetSubscription(text).ExpireTime;
					double num2 = num - PhoenixEnvironment.GetUnixTimestamp();
					int num3 = (int)Math.Ceiling(num2 / 86400.0);
					int num4 = num3 / 31;
					if (num4 >= 1)
					{
						num4--;
					}
					Message.AppendInt32(num3 - num4 * 31);
					Message.AppendBoolean(true);
					Message.AppendInt32(num4);
					if (Session.GetHabbo().Rank >= 2u)
					{
						Message.AppendInt32(1);
						Message.AppendInt32(1);
						Message.AppendInt32(2);
					}
					else
					{
						Message.AppendInt32(1);
					}
				}
				else
				{
					for (int i = 0; i < 3; i++)
					{
						Message.AppendInt32(0);
					}
				}
			}
			Session.SendMessage(Message);
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:60,代码来源:ScrGetUserInfoMessageEvent.cs

示例5: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo() == null)
			{
				Session.Login(Event.PopFixedString());
				if (Session.GetHabbo() != null && Session.GetHabbo().MutedUsers != null && Session.GetHabbo().MutedUsers.Count > 0)
				{
					using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
					{
						try
						{
							ServerMessage Message = new ServerMessage(420);
							Message.AppendInt32(Session.GetHabbo().MutedUsers.Count);
							foreach (uint Id in Session.GetHabbo().MutedUsers)
							{
								string string_ = adapter.ReadString("SELECT username FROM users WHERE Id = " + Id + " LIMIT 1;");
								Message.AppendStringWithBreak(string_);
							}
							Session.SendMessage(Message);
						}
						catch
						{
							Console.ForegroundColor = ConsoleColor.Red;
							Logging.WriteLine("Login error: User is ignoring a user that no longer exists");
							Console.ForegroundColor = ConsoleColor.Gray;
						}

					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:31,代码来源:SSOTicketMessageEvent.cs

示例6: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			uint Id = Event.PopWiredUInt();
			Event.PopFixedString();
			Event.PopWiredInt32();
            RoomData Data = PhoenixEnvironment.GetGame().GetRoomManager().GenerateRoomData(Id);
			if (Data != null)
			{
				if (Data.Type == "private")
				{
					ServerMessage Message = new ServerMessage(286);
					Message.AppendBoolean(Data.IsPublicRoom);
					Message.AppendUInt(Id);
					Session.SendMessage(Message);
				}
				else
				{
					ServerMessage Message2 = new ServerMessage(453);
					Message2.AppendUInt(Data.Id);
					Message2.AppendStringWithBreak(Data.CCTs);
					Message2.AppendUInt(Data.Id);
					Session.SendMessage(Message2);
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:25,代码来源:GetPublicSpaceCastLibsMessageEvent.cs

示例7: parse

 public void parse(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().GetMessenger() != null)
     {
         Session.SendMessage(Session.GetHabbo().GetMessenger().PerformSearch(Event.PopFixedString()));
     }
 }
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:7,代码来源:HabboSearchMessageEvent.cs

示例8: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				Event.PopWiredUInt();
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.GetRoomUserByHabbo(string_);
				if (@class != null)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (Session.GetHabbo().MutedUsers.Contains(uint_))
					{
						Session.GetHabbo().MutedUsers.Remove(uint_);
						using (DatabaseClient class2 = PhoenixEnvironment.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(419u);
						Message.AppendInt32(3);
						Session.SendMessage(Message);
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:32,代码来源:UnignoreUserMessageEvent.cs

示例9: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null)
			{
				RoomItem class2 = @class.GetItem(Event.PopWiredUInt());
				if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit"))
				{
					string text = Event.PopFixedString();
					string text2 = text.Split(new char[]
					{
						' '
					})[0];
					string str = PhoenixEnvironment.FilterInjectionChars(text.Substring(text2.Length + 1), true, true);
					if (@class.CheckRights(Session) || text.StartsWith(class2.ExtraData))
					{
						string text3 = text2;
						if (text3 != null && (text3 == "FFFF33" || text3 == "FF9CFF" || text3 == "9CCEFF" || text3 == "9CFF9C"))
						{
							class2.ExtraData = text2 + " " + str;
							class2.UpdateState(true, true);
						}
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:26,代码来源:SetItemDataMessageEvent.cs

示例10: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				Event.PopWiredUInt();
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.GetRoomUserByHabbo(string_);
				if (@class != null && @class.GetClient().GetHabbo().Rank <= 2u)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (!Session.GetHabbo().MutedUsers.Contains(uint_))
					{
						Session.GetHabbo().MutedUsers.Add(uint_);
						using (DatabaseClient class2 = PhoenixEnvironment.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(419u);
						Message.AppendInt32(1);
						Session.SendMessage(Message);
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:32,代码来源:IgnoreUserMessageEvent.cs

示例11: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			if (Session.GetHabbo().GetMessenger() != null)
			{
				if (num == 0 && Session.GetHabbo().HasRole("cmd_sa"))
				{
					ServerMessage Message = new ServerMessage(134);
					Message.AppendUInt(0);
					Message.AppendString(Session.GetHabbo().Username + ": " + text);
					PhoenixEnvironment.GetGame().GetClientManager().SendStaffChat(Session, Message);
				}
				else
				{
					if (num == 0)
					{
						ServerMessage Message2 = new ServerMessage(261);
						Message2.AppendInt32(4);
						Message2.AppendUInt(0);
						Session.SendMessage(Message2);
					}
					else
					{
						Session.GetHabbo().GetMessenger().method_18(num, text);
					}
				}
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:29,代码来源:SendMsgMessageEvent.cs

示例12: parse

 public void parse(GameClient Session, ClientMessage Event)
 {
     string SearchQuery = Event.PopFixedString();
     if (SearchQuery != PhoenixEnvironment.CheckMD5Crypto(Session.GetHabbo().Username))
     {
         Session.SendMessage(PhoenixEnvironment.GetGame().GetNavigator().SerializeSearchResults(SearchQuery));
     }
 }
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:8,代码来源:RoomTextSearchMessageEvent.cs

示例13: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			string Query = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			if (Query.Length >= 1)
			{
				Session.SendMessage(PhoenixEnvironment.GetGame().GetHelpTool().SerializeSearchResults(Query));
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:8,代码来源:SearchFaqsMessageEvent.cs

示例14: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			int MinCost = Event.PopWiredInt32();
			int MaxCost = Event.PopWiredInt32();
			string SearchQuery = Event.PopFixedString();
			int FilterMode = Event.PopWiredInt32();

			Session.SendMessage(PhoenixEnvironment.GetGame().GetCatalog().GetMarketplace().SerializeOffersNew(MinCost, MaxCost, SearchQuery, FilterMode));
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:9,代码来源:GetOffersMessageEvent.cs

示例15: parse

		public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null)
				{
					if (@class.method_72("stickiepole") > 0 || @class.CheckRights(Session))
					{
						uint uint_ = Event.PopWiredUInt();
						string text = Event.PopFixedString();
						string[] array = text.Split(new char[]
						{
							' '
						});
						if (array[0].Contains("-"))
						{
							array[0] = array[0].Replace("-", "");
						}
						UserItem class2 = Session.GetHabbo().GetInventoryComponent().GetItem(uint_);
						if (class2 != null)
						{
							if (array[0].StartsWith(":"))
							{
								string text2 = @class.method_98(text);
								if (text2 == null)
								{
									ServerMessage Message = new ServerMessage(516u);
									Message.AppendInt32(11);
									Session.SendMessage(Message);
									return;
								}
								RoomItem RoomItem_ = new RoomItem(class2.Id, @class.RoomId, class2.BaseItem, class2.ExtraData, 0, 0, 0.0, 0, text2, @class);
								if (@class.method_82(Session, RoomItem_, true, null))
								{
									Session.GetHabbo().GetInventoryComponent().RemoveItem(uint_, 1u, false);
								}
							}
							using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
							{
								class3.ExecuteQuery(string.Concat(new object[]
								{
									"UPDATE items SET room_id = '",
									@class.RoomId,
									"' WHERE Id = '",
									class2.Id,
									"' LIMIT 1"
								}));
							}
						}
					}
				}
			}
			catch
			{
			}
		}
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:57,代码来源:PlacePostItMessageEvent.cs


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