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


C# GenericWriter.WriteMobile方法代码示例

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


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

示例1: Serialize

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

            int version = writer.SetVersion(0);

            switch (version)
            {
                case 0:
                {
                    writer.WriteMobile(Owner);
                    writer.Write(OverallScore);

                    writer.Write(SpecificPortalScores.Count);

                    if (SpecificPortalScores.Count > 0)
                    {
                        foreach (KeyValuePair<PortalSerial, int> kvp in SpecificPortalScores)
                        {
                            kvp.Key.Serialize(writer);
                            writer.Write(kvp.Value);
                        }
                    }
                }
                    break;
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:27,代码来源:PlayerPortalProfile.cs

示例2: Serialize

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

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

            writer.WriteMobile(m_Player);
        }
开发者ID:Godkong,项目名称:Origins,代码行数:8,代码来源:HolidayTicket.cs

示例3: Serialize

 public override void Serialize(GenericWriter writer)
 {
     base.Serialize(writer);
     writer.Write(1); // version 
     writer.Write(m_Recipe);
     writer.Write(m_MobileList.Count);
     foreach (KeyValuePair<Serial, Mobile> keyValuePair in m_MobileList)
         writer.WriteMobile(keyValuePair.Value);
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:9,代码来源:RecipeScrollStone.cs

示例4: Serialize

        /// <summary>
        /// Serialization
        /// </summary>
        public virtual void Serialize( GenericWriter writer )
        {
            writer.Write((int)0); //version

            writer.WriteMobile<Player>(Player);
            writer.Write((int)Expenditures.Count);

            foreach( EoCExpenditure exp in Expenditures )
            {
                writer.Write(exp.GetType().FullName);
                exp.Serialize(writer);
            }
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:16,代码来源:EoCLedger.cs

示例5: SerializePlayerProfiles

        private static bool SerializePlayerProfiles(GenericWriter writer)
        {
            writer.SetVersion(0);

            writer.WriteBlockDictionary(
                PlayerProfiles,
                (pm, p) =>
                {
                    writer.WriteMobile(pm);

                    p.Serialize(writer);
                });

            return true;
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:15,代码来源:ZombieEvent_Init.cs

示例6: Serialize

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

            int version = writer.SetVersion(2);

            switch (version)
            {
                case 2:
                    {
                        writer.Write(Tier1Cap);
                        writer.Write(Tier2Cap);
                        writer.Write(Tier3Cap);
                        writer.Write(Tier4Cap);
                        writer.Write(Tier5Cap);
                        writer.Write(Tier6Cap);
                        writer.Write(Tier7Cap);
                        writer.Write(Tier8Cap);
                        writer.Write(Tier9Cap);
                        writer.Write(Tier10Cap);
                    }
                    goto case 1;
                case 1:
                {
                    writer.Write(DragonBossDamage);
                }
                    goto case 0;
                case 0:
                {
                    writer.WriteMobile(Owner);
                    writer.Write(OverallScore);
                    writer.Write(SpendablePoints);
                    writer.Write(Kills);
                    writer.Write(Deaths);
                    writer.Write(ZombieAvatar);
                    writer.Write(Active);
                    writer.Write(ZombieSavePoint);

                    writer.Write(ZombieKills.Count);

                    if (ZombieKills.Count > 0)
                    {
                        foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in ZombieKills)
                        {
                            kvp.Key.Serialize(writer);
                            writer.Write(kvp.Value);
                        }
                    }

                    writer.Write(DaemonKills.Count);

                    if (DaemonKills.Count > 0)
                    {
                        foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in DaemonKills)
                        {
                            kvp.Key.Serialize(writer);
                            writer.Write(kvp.Value);
                        }
                    }

                    writer.Write(FeyKills.Count);

                    if (FeyKills.Count > 0)
                    {
                        foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in FeyKills)
                        {
                            kvp.Key.Serialize(writer);
                            writer.Write(kvp.Value);
                        }
                    }

                    writer.Write(GoreFiendKills.Count);

                    if (GoreFiendKills.Count > 0)
                    {
                        foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in GoreFiendKills)
                        {
                            kvp.Key.Serialize(writer);
                            writer.Write(kvp.Value);
                        }
                    }

                    writer.Write(TentacleKills.Count);

                    if (TentacleKills.Count > 0)
                    {
                        foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in TentacleKills)
                        {
                            kvp.Key.Serialize(writer);
                            writer.Write(kvp.Value);
                        }
                    }

                    writer.Write(TreefellowKills.Count);

                    if (TreefellowKills.Count > 0)
                    {
                        foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in TreefellowKills)
                        {
                            kvp.Key.Serialize(writer);
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:PlayerZombieProfile.cs

示例7: Serialize

            /// <summary>
            /// Serializes the context data
            /// </summary>
            public void Serialize( GenericWriter writer )
            {
                writer.Write((int)0);

                writer.WriteMobile<Player>(Player);

                writer.Write(_boats);
                writer.Write(_lastLogin);
                writer.Write(_mountedSteps);
                writer.Write(_walkingSteps);
            }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:14,代码来源:EoCGenerator.cs

示例8: Serialize

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

            int version = writer.SetVersion(1);

            switch (version)
            {
                case 1:
                    writer.WriteMobile(Pet);
                    goto case 0;
                case 0:
                    break;
            }
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:15,代码来源:MetaStone.cs

示例9: Serialize

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

			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteMobile(Owner);

						writer.WriteBlockList(Titles, CustomTitles.WriteTitle);
						writer.WriteBlockList(Hues, CustomTitles.WriteTitleHue);

						CustomTitles.WriteTitle(writer, SelectedTitle);
						CustomTitles.WriteTitleHue(writer, SelectedHue);
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:21,代码来源:TitleProfile.cs

示例10: Serialize

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)1); // version

            //Version 1
            if (House == null || House.Deleted)
            {
                writer.Write(false);
                YardSystem.AddOrphanedItem(this);
            }
            else
            {
                writer.Write(true);
                writer.Write(House);
            }

            //Version 0
            writer.WriteMobile(Placer);
            writer.Write(Price);
            writer.WriteItemList(Pieces);
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:22,代码来源:YardItem.cs

示例11: Serialize

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

            writer.WriteMobile(this.m_DeadPlayer);
        }
开发者ID:m309,项目名称:ForkUO,代码行数:7,代码来源:PlayerZombies.cs

示例12: Serialize

		public void Serialize( GenericWriter writer )
		{
			// Version info is written in MLQuestPersistence.Serialize

			writer.WriteMobile<PlayerMobile>( m_Owner );
			writer.Write( m_QuestInstances.Count );

			foreach ( MLQuestInstance instance in m_QuestInstances )
				instance.Serialize( writer );

			writer.Write( m_DoneQuests.Count );

			foreach ( MLDoneQuestInfo info in m_DoneQuests )
				info.Serialize( writer );

			writer.Write( m_ChainOffers.Count );

			foreach ( MLQuest quest in m_ChainOffers )
				MLQuestSystem.WriteQuestRef( writer, quest );

			writer.WriteEncodedInt( (int)m_Flags );
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:22,代码来源:MLQuestContext.cs

示例13: Serialize

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

            int version = writer.SetVersion(0);

            switch (version)
            {
                case 0:
                {
                    writer.WriteMobile(Pet);
                    writer.Write((int)m_CommandCharges);
                    writer.Write((int)m_LoyaltyCharges);
                    writer.Write(Activated);
                }
                    break;
            }
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:18,代码来源:WandofLoyalty.cs

示例14: Serialize

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

			int version = writer.SetVersion(1);

			switch (version)
			{
				case 1:
					writer.WriteMobile(BoundToMobile);
					goto case 0;
				case 0:
					writer.Write(RawTitle);
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:16,代码来源:TitleScroll.cs

示例15: Serialize

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

			writer.Write(0); // version

			writer.WriteMobile(Owner);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:8,代码来源:Food.cs


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