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


C# GenericWriter.WriteUInt32方法代码示例

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


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

示例1: Serialize

		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);

			writer.Write((int)20); // version

			// version 20 - Adam
			writer.WriteUInt32(m_NPCData);

			// version 19 - Adam
			writer.Write(m_RestartDecay);

			//version 18 - Adam
			writer.WriteUInt32((System.UInt32)m_Flags);

			//version 17 - Adam
			writer.WriteUInt32(m_UpgradeCosts);

			//version 16 - Adam
			writer.WriteUInt32(m_LockBoxData);

			//version 15 - Pix
			writer.Write(m_SecurePremises);

			//version 14 - TK - store bool if IDOC Announcement is running
			writer.Write((bool)(m_IDOC_Broadcast_TCE != null));

			//version 13 - Pix. - store minutes instead of timespan
			writer.Write(m_DecayMinutesStored);

			//version 12 - Pix. - house decay variables
			//writer.WriteDeltaTime( StructureDecayTime );
			writer.Write(m_NeverDecay);
			//end version 12 additions

			writer.Write(m_MaxLockBoxes);

			// use the Property to insure we have an accurate count
			writer.Write(LockBoxCount);

			writer.Write((int)m_Visits);

			writer.Write((int)m_Price);

			writer.WriteMobileList(m_Access);

			writer.Write(m_BuiltOn);
			writer.Write(m_LastTraded);

			writer.WriteItemList(m_Addons, true);

			writer.Write(m_Secures.Count);

			for (int i = 0; i < m_Secures.Count; ++i)
				((SecureInfo)m_Secures[i]).Serialize(writer);

			writer.Write(m_Public);

			writer.Write(BanLocation);

			writer.Write(m_Owner);

			// Version 5 no longer serializes region coords
			/*writer.Write( (int)m_Region.Coords.Count );
			foreach( Rectangle2D rect in m_Region.Coords )
			{
				writer.Write( rect );
			}*/

			writer.WriteMobileList(m_CoOwners, true);
			writer.WriteMobileList(m_Friends, true);
			writer.WriteMobileList(m_Bans, true);

			writer.Write(m_Sign);
			writer.Write(m_Trash);

			writer.WriteItemList(m_Doors, true);
			writer.WriteItemList(m_LockDowns, true);
			//writer.WriteItemList( m_Secures, true );

			writer.Write((int)m_MaxLockDowns);
			writer.Write((int)m_MaxSecures);

			/* -- Adam: This code no longer applies as you cannot lock down containers
			 * that are not 'deco' in a public building. Furthermore, you cannot lock down
			 * items inside of a container.
			// Items in locked down containers that aren't locked down themselves must decay!
			//6/24/04 - Pix: this functionality shouldn't happen for private houses with our
			//	lockbox concept.
			if( m_Public )  
			{
				for ( int i = 0; i < m_LockDowns.Count; ++i )
				{
					Item item = (Item)m_LockDowns[i];

					if ( item is Container && !(item is BaseBoard) )
					{
						Container cont = (Container)item;
						ArrayList children = cont.Items;

//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseHouse.cs


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