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


C# GenericReader.ReadFlag方法代码示例

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


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

示例1: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			var version = reader.GetVersion();

			switch (version)
			{
				case 1:
				case 0:
				{
					if (version < 1)
					{
						reader.ReadShort();
						reader.ReadInt();
					}

					UpdateInterval = reader.ReadTimeSpan();
					RequestFlags = reader.ReadFlag<ReqFlags>();
				}
					break;
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:23,代码来源:SystemOpts.cs

示例2: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			reader.GetVersion();

			_Resource = reader.ReadFlag<CraftResource>();
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:8,代码来源:BaseFireworkStar.cs

示例3: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			var version = reader.GetVersion();

			switch (version)
			{
				case 1:
				{
					Mode = reader.ReadFlag<SkillCodexMode>();
					Flags = reader.ReadFlag<SkillCodexFlags>();
					Count = reader.ReadInt();
					Value = reader.ReadDouble();
					DeleteWhenEmpty = reader.ReadBool();
					IgnoredSkills = reader.ReadList(r => r.ReadFlag<SkillName>());
				}
					break;
				case 0:
				{
					Mode = (SkillCodexMode)reader.ReadByte();
					Flags = (SkillCodexFlags)reader.ReadByte();
					Count = reader.ReadInt();
					Value = reader.ReadDouble();
					DeleteWhenEmpty = reader.ReadBool();
					IgnoredSkills = reader.ReadList(() => (SkillName)reader.ReadShort());
				}
					break;
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:30,代码来源:SkillCodex.cs

示例4: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 0:
					{
						_Token = reader.ReadString();
						_Crafter = reader.ReadMobile();

						UseDelay = reader.ReadTimeSpan();
						FuseDelay = reader.ReadTimeSpan();

						IgniteEffectID = reader.ReadInt();
						IgniteEffectHue = reader.ReadInt();
						IgniteEffectSpeed = reader.ReadInt();
						IgniteEffectRender = reader.ReadFlag<EffectRender>();
						IgniteEffectSound = reader.ReadInt();

						FailEffectID = reader.ReadInt();
						FailEffectHue = reader.ReadInt();
						FailEffectSpeed = reader.ReadInt();
						FailEffectDuration = reader.ReadInt();
						FailEffectRender = reader.ReadFlag<EffectRender>();
						FailEffectSound = reader.ReadInt();
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:32,代码来源:BaseFirework.cs

示例5: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 1:
					{
						GumpWidth = reader.ReadInt();
						GumpHeight = reader.ReadInt();
						GumpPadding = reader.ReadInt();
						GumpBackground = reader.ReadInt();
						GumpForeground = reader.ReadInt();
						GumpFlow = reader.ReadFlag<ProgressBarFlow>();
						GumpTextColor = reader.ReadFlag<KnownColor>();
						GumpDisplayPercent = reader.ReadBool();
						GumpDisplayText = reader.ReadBool();
					}
					goto case 0;
				case 0:
					{
						PositionCommand = reader.ReadString();
						ToggleCommand = reader.ReadString();
					}
					break;
			}

			if (version > 0)
			{
				return;
			}

			GumpWidth = ProgressBarGump.DefaultWidth;
			GumpHeight = ProgressBarGump.DefaultHeight;

			GumpPadding = ProgressBarGump.DefaultPadding;

			GumpBackground = ProgressBarGump.DefaultBackgroundID;
			GumpForeground = ProgressBarGump.DefaultForegroundID;

			GumpFlow = ProgressBarGump.DefaultFlow;
			GumpTextColor = SuperGump.DefaultHtmlColor.ToKnownColor();

			GumpDisplayPercent = false;
			GumpDisplayText = true;
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:48,代码来源:SystemOpts.cs

示例6: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 0:
					{
						SetNameColor = reader.ReadFlag<KnownColor>();
						PartNameColor = reader.ReadFlag<KnownColor>();
						ModNameColor = reader.ReadFlag<KnownColor>();
						InactiveColor = reader.ReadFlag<KnownColor>();

						AdminCommand = reader.ReadString();
					}
					break;
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:20,代码来源:SystemOpts.cs

示例7: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			reader.GetVersion();

			Name = reader.ReadString();
			Summary = reader.ReadString();
			Token = reader.ReadString();
			Available = reader.ReadBool();
			AutoJoin = reader.ReadBool();
			Access = reader.ReadFlag<AccessLevel>();
			ProfanityAction = reader.ReadFlag<ProfanityAction>();
			TextColor = reader.ReadFlag<KnownColor>();
			TextHue = reader.ReadInt();
			UserLimit = reader.ReadInt();
			SpamDelay = reader.ReadTimeSpan();

			Bans = reader.ReadBlockDictionary(
				r =>
				{
					var k = r.ReadMobile<PlayerMobile>();
					var v = r.ReadDateTime();
					return new KeyValuePair<PlayerMobile, DateTime>(k, v);
				});

			History = new Dictionary<PlayerMobile, WorldChatMessage>();
			Users = new Dictionary<PlayerMobile, DateTime>();
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:29,代码来源:Channel.cs

示例8: Deserialize

		public virtual void Deserialize(GenericReader reader)
		{
			int version = reader.GetVersion();

			if (version > 5)
			{
				reader.ReadBlock(
					r =>
					{
						if (version > 6)
						{
							Serial = new PvPSerial(r);
						}
						else
						{
							Serial = r.ReadTypeCreate<PvPSerial>(r) ?? new PvPSerial(r);
						}
					});
			}

			switch (version)
			{
				case 7:
				case 6:
				case 5:
					Hidden = reader.ReadBool();
					goto case 4;
				case 4:
					FloorItemDelete = reader.ReadBool();
					goto case 3;
				case 3:
				case 2:
					{
						Gate = reader.ReadItem<PvPSpectatorGate>();

						if (Gate != null)
						{
							Gate.Battle = this;
						}
					}
					goto case 1;
				case 1:
					{
						Category = reader.ReadString();
						Ranked = reader.ReadBool();
						InviteWhileRunning = reader.ReadBool();
					}
					goto case 0;
				case 0:
					{
						if (version < 6)
						{
							reader.ReadBlock(r => Serial = r.ReadTypeCreate<PvPSerial>(r) ?? new PvPSerial(r));
						}

						DebugMode = reader.ReadBool();
						State = reader.ReadFlag<PvPBattleState>();
						Name = reader.ReadString();
						Description = reader.ReadString();
						AutoAssign = reader.ReadBool();
						UseTeamColors = reader.ReadBool();
						IgnoreCapacity = reader.ReadBool();
						SubCommandPrefix = reader.ReadChar();
						QueueAllowed = reader.ReadBool();
						SpectateAllowed = reader.ReadBool();
						KillPoints = version < 3 ? (reader.ReadBool() ? 1 : 0) : reader.ReadInt();
						PointsBase = reader.ReadInt();
						PointsRankFactor = reader.ReadDouble();
						IdleKick = reader.ReadBool();
						IdleThreshold = reader.ReadTimeSpan();
						LastState = reader.ReadFlag<PvPBattleState>();
						LastStateChange = reader.ReadDateTime();
						LightLevel = reader.ReadInt();
						LogoutDelay = reader.ReadTimeSpan();

						Doors.AddRange(reader.ReadStrongItemList<BaseDoor>());

						reader.ReadBlock(r => Options = r.ReadTypeCreate<PvPBattleOptions>(r) ?? new PvPBattleOptions(r));

						if (Schedule != null && Schedule.Running)
						{
							Schedule.Stop();
						}

						reader.ReadBlock(r => Schedule = r.ReadTypeCreate<Schedule>(r) ?? new Schedule("Battle " + Serial.Value, false));
						reader.ReadBlock(r => BattleRegion = r.ReadTypeCreate<PvPBattleRegion>(this, r) ?? new PvPBattleRegion(this, r));
						reader.ReadBlock(
							r => SpectateRegion = r.ReadTypeCreate<PvPSpectateRegion>(this, r) ?? new PvPSpectateRegion(this, r));

						reader.ReadBlockList(r => r.ReadTypeCreate<PvPTeam>(this, r) ?? new PvPTeam(this, r), Teams);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:94,代码来源:Battle_Serialize.cs

示例9: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			var version = reader.GetVersion();

			switch (version)
			{
				case 2:
					NotifyPlayer = reader.ReadBool();
					goto case 1;
				case 1:
				{
					SearchMode = reader.ReadFlag<StringSearchFlags>();
					SearchCapsIgnore = reader.ReadBool();
				}
					goto case 0;
				case 0:
				{
					if (version < 1)
					{
						SearchMode = StringSearchFlags.Contains;
						SearchCapsIgnore = true;
					}

					WhitespaceAliases = reader.ReadBlockList(r => r.ReadChar());
					KeyWords = reader.ReadBlockList(r => r.ReadString());

					LogEnabled = reader.ReadBool();
					ConsoleWrite = reader.ReadBool();

					PageStaff = reader.ReadBool();

					NotifyStaff = reader.ReadBool();
					NotifyAccess = reader.ReadFlag<AccessLevel>();

					Jail = reader.ReadBool();
					JailPoint = new MapPoint(reader);

					Squelch = reader.ReadBool();
					Kick = reader.ReadBool();
					Ban = reader.ReadBool();
				}
					break;
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:46,代码来源:SystemOptions.cs

示例10: Deserialize

		public virtual void Deserialize(GenericReader reader)
		{
			int version = reader.GetVersion();

			switch (version)
			{
				case 1:
				case 0:
					{
						_Info = reader.ReadTypeCreate<ScheduleInfo>(reader) ?? new ScheduleInfo(reader);

						_Enabled = reader.ReadBool();
						_Name = reader.ReadString();
						_DefaultPriority = reader.ReadFlag<TimerPriority>();

						if (reader.ReadBool())
						{
							_LastGlobalTick = reader.ReadDateTime();
						}

						if (reader.ReadBool())
						{
							_NextGlobalTick = reader.ReadDateTime();
						}

						Delay = reader.ReadTimeSpan();
						Interval = reader.ReadTimeSpan();
					}
					break;
			}

			if (version < 1)
			{
				return;
			}

			if (reader.ReadBool() && _Enabled)
			{
				Running = true;
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:41,代码来源:Schedule.cs

示例11: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			var version = reader.GetVersion();

			switch (version)
			{
				case 0:
				{
					Schedule = new Schedule(reader);

					Timeout = reader.ReadTimeSpan();
					NotifyAccess = reader.ReadFlag<AccessLevel>();
					NotifyStaff = reader.ReadBool();
				}
					break;
			}
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:19,代码来源:SystemOpts.cs

示例12: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			switch (version)
			{
				case 1:
					UID = reader.ReadString();
					goto case 0;
				case 0:
					{
						Stat = reader.ReadFlag<StatType>();
						Offset = reader.ReadInt();
						Duration = reader.ReadTimeSpan();
					}
					break;
			}

			if (String.IsNullOrWhiteSpace(UID))
			{
				UID = Name + DateTime.UtcNow.ToTimeStamp().Stamp.ToString(CultureInfo.InvariantCulture);
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:25,代码来源:StatOffset.cs

示例13: Deserialize

		public void Deserialize(GenericReader reader)
		{
			int version = reader.GetVersion();

			switch (version)
			{
				case 0:
					{
						ID = reader.ReadString();
						_State = reader.ReadFlag<DonationTransactionState>();
						Account = reader.ReadAccount();
						Email = reader.ReadString();
						Total = reader.ReadDecimal();
						_Credit = reader.ReadLong();
						_Time = reader.ReadDouble();
						Version = reader.ReadInt();
						_InternalVersion = reader.ReadInt();
						_Notes = reader.ReadString();
						_Extra = reader.ReadString();

						DeliverFrom = reader.ReadMobile();
						DeliverTo = reader.ReadMobile();

						DeliveryTime = reader.ReadDouble();
					}
					break;
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:28,代码来源:Transaction.cs

示例14: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 0:
					{
						Command = reader.ReadFlag<AutoPvPStoneCommand>();
						UsageColor = reader.ReadFlag<KnownColor>();
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:16,代码来源:AutoPvPStone.cs

示例15: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 0:
					{
						Enabled = reader.ReadBool();
						Force = reader.ReadBool();
						Impacts = reader.ReadBool();
						Density = reader.ReadInt();
						Direction = reader.ReadFlag<PvPBattleWeatherDirection>();

						EffectID = reader.ReadInt();
						EffectHue = reader.ReadInt();
						EffectSpeed = reader.ReadInt();
						EffectRender = reader.ReadFlag<EffectRender>();

						ImpactEffectID = reader.ReadInt();
						ImpactEffectHue = reader.ReadInt();
						ImpactEffectSpeed = reader.ReadInt();
						ImpactEffectDuration = reader.ReadInt();
						ImpactEffectRender = reader.ReadFlag<EffectRender>();
						ImpactEffectSound = reader.ReadInt();
					}
					break;
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:31,代码来源:Weather.cs


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