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


C# ClientMessage.ResetPointer方法代码示例

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


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

示例1: 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

示例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_);
                switch (item.GetBaseItem().InteractionType.ToLower())
				{
				case "wf_act_give_phx":
				{
					Event.PopWiredBoolean();
					string text2 = Event.PopFixedString();
					text2 = PhoenixEnvironment.FilterInjectionChars(text2, false, true);
					text2 = ChatCommandHandler.ApplyWordFilter(text2);
					if (!(text2 == item.Extra1))
					{
						string string_ = text2.Split(new char[]
						{
							':'
						})[0].ToLower();
						if (PhoenixEnvironment.GetGame().GetRoleManager().HasWiredEffectRole(string_, Session))
						{
							item.Extra1 = text2;
						}
						else
						{
							Session.GetHabbo().Sendselfwhisper(TextManager.GetText("wired_error_permissions"));
						}
					}
					break;
				}
				case "wf_cnd_phx":
				{
					Event.PopWiredBoolean();
					string text2 = Event.PopFixedString();
					text2 = PhoenixEnvironment.FilterInjectionChars(text2, false, true);
					text2 = ChatCommandHandler.ApplyWordFilter(text2);
					if (!(text2 == item.Extra1))
					{
						string string_ = text2.Split(new char[]
						{
							':'
						})[0].ToLower();
						if (PhoenixEnvironment.GetGame().GetRoleManager().HasWiredConditionRole(string_, Session))
						{
							item.Extra1 = text2;
						}
						else
						{
							Session.GetHabbo().Sendselfwhisper(TextManager.GetText("wired_error_permissions"));
						}
					}
					break;
				}
				case "wf_act_saymsg":
				{
					Event.PopWiredBoolean();
					string text2 = Event.PopFixedString();
					text2 = PhoenixEnvironment.FilterInjectionChars(text2, false, true);
					if (text2.Length > 100)
					{
						text2 = text2.Substring(0, 100);
					}
					item.Extra1 = text2;
					break;
				}
				case "wf_trg_furnistate":
				case "wf_trg_onfurni":
				case "wf_trg_offfurni":
				case "wf_act_moveuser":
				case "wf_act_togglefurni":
				{
					Event.PopWiredBoolean();
					Event.PopFixedString();
					item.Extra1 = Event.ToString().Substring(Event.Length - (Event.RemainingLength - 2));
					item.Extra1 = item.Extra1.Substring(0, item.Extra1.Length - 2);
					Event.ResetPointer();
					item = room.GetItem(Event.PopWiredUInt());
					Event.PopWiredBoolean();
					Event.PopFixedString();
					int num2 = Event.PopWiredInt32();
					item.Extra2 = "";
					for (int i = 0; i < num2; i++)
					{
						item.Extra2 = item.Extra2 + "," + Convert.ToString(Event.PopWiredUInt());
					}
					if (item.Extra2.Length > 0)
					{
						item.Extra2 = item.Extra2.Substring(1);
					}
					break;
				}
				case "wf_act_givepoints":
					Event.PopWiredInt32();
					item.Extra1 = Convert.ToString(Event.PopWiredInt32());
					item.Extra2 = Convert.ToString(Event.PopWiredInt32());
					break;
				case "wf_act_moverotate":
				{
//.........这里部分代码省略.........
开发者ID:neto737,项目名称:Phoenix_3.0,代码行数:101,代码来源:UpdateActionMessageEvent.cs


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