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


C# GenericReader.ReadBlockList方法代码示例

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


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

示例1: Deserialize

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

			int version = reader.GetVersion();

			switch (version)
			{
				case 1:
					SpectateGate = new MapPoint(reader);
					goto case 0;
				case 0:
					{
						Map = reader.ReadMap();
						BattlePriority = reader.ReadInt();
						Eject = new MapPoint(reader);
						SpectateJoin = reader.ReadPoint3D();
						BattleBounds = reader.ReadBlockList(r => r.ReadRect3D());
						SpectateBounds = reader.ReadBlockList(r => r.ReadRect3D());
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:23,代码来源:Locations.cs

示例2: DeserializeProfiles

		private static bool DeserializeProfiles(GenericReader reader)
		{
			var list = reader.ReadBlockList(r => new TrashProfile(r));

			list.ForEach(p => Profiles.AddOrReplace(p.Owner, p));
			list.Free(true);

			return true;
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:9,代码来源:TrashCollection_Init.cs

示例3: DeserializeChannels

		private static void DeserializeChannels(GenericReader reader)
		{
			reader.GetVersion();

			int idx = 0;

			reader.ReadBlockArray(
				r =>
				{
					var c = _PermaChannels[idx++];

					if (c != null)
					{
						c.Deserialize(r);
					}

					return c;
				},
				_PermaChannels);

			reader.ReadBlockList(r => r.ReadTypeCreate<WorldChatChannel>(r), _Channels);
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:22,代码来源:WorldChat_Init.cs

示例4: DeserializeHandlers

		private static bool DeserializeHandlers(GenericReader reader)
		{
			var list = reader.ReadBlockList(r => r.ReadTypeCreate<BaseTrashHandler>(r));

			list.ForEach(h => Handlers.AddOrReplace(h.UID, h));
			list.Free(true);

			InternalHandlerSort();
			return true;
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:10,代码来源:TrashCollection_Init.cs

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

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

示例7: DeserializeReports

		private static void DeserializeReports(GenericReader reader)
		{
			reader.GetVersion();

			reader.ReadBlockList(r => new AntiAdvertsReport(r), Reports);
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:6,代码来源:AntiAdverts_Init.cs

示例8: Deserialize

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

			switch (version)
			{
				case 0:
					{
						Owner = reader.ReadMobile<PlayerMobile>();
						Deleted = reader.ReadBool();

						if (!Deleted)
						{
							History = reader.ReadBlockDictionary(
								() =>
								{
									TimeStamp k = reader.ReadDouble();
									var v = reader.ReadBlockList(() => new TrashProfileEntry(reader));
									return new KeyValuePair<TimeStamp, List<TrashProfileEntry>>(k, v);
								});
						}
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:25,代码来源:TrashProfile.cs


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