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


C# GenericReader.ReadStrongItemList方法代码示例

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


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

示例1: VendorInventory

        public VendorInventory(BaseHouse house, GenericReader reader)
        {
            this.m_House = house;

            int version = reader.ReadEncodedInt();

            this.m_Owner = reader.ReadMobile();
            this.m_VendorName = reader.ReadString();
            this.m_ShopName = reader.ReadString();

            this.m_Items = reader.ReadStrongItemList();
            this.m_Gold = reader.ReadInt();

            this.m_ExpireTime = reader.ReadDeltaTime();

            if (this.m_Items.Count == 0 && this.m_Gold == 0)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(Delete));
            }
            else
            {
                TimeSpan delay = this.m_ExpireTime - DateTime.Now;
                this.m_ExpireTimer = new ExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
                this.m_ExpireTimer.Start();
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:26,代码来源:VendorInventory.cs

示例2: Deserialize

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

            int version = reader.ReadEncodedInt();

            this.m_Keys = reader.ReadStrongItemList<Key>();
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:8,代码来源:KeyRing.cs

示例3: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                    {
                        this.m_Components = reader.ReadStrongItemList();

                        break;
                    }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(this.Delete));
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:18,代码来源:PreviewHouse.cs

示例4: Deserialize

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

            int version = reader.ReadInt();

            switch (version)
            {
                case 2:
                    {
                        m_GameItems = reader.ReadStrongItemList();
                        m_WinnerLocation = reader.ReadPoint3D();
                        goto case 1;
                    }
                case 1:
                    {
                        m_GameArea = reader.ReadRect2D();
                        break;
                    }
            }
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:21,代码来源:BombermanGame.cs

示例5: Deserialize

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

            this.m_DamageEntries = new Dictionary<Mobile, int>();

            int version = reader.ReadInt();

            switch( version )
            {
				case 6:
					SpawnName = reader.ReadString();
					AutoRestart = reader.ReadBool();
					SpawnMod = reader.ReadDouble();
					SpawnRadius = reader.ReadInt();
					goto case 5;
                case 5:
                    {
                        int entries = reader.ReadInt();
                        Mobile m;
                        int damage;
                        for (int i = 0; i < entries; ++i)
                        {
                            m = reader.ReadMobile();
                            damage = reader.ReadInt();

                            if (m == null)
                                continue;

                            this.m_DamageEntries.Add(m, damage);
                        }

                        goto case 4;
                    }
                case 4:
                    {
                        this.m_ConfinedRoaming = reader.ReadBool();
                        this.m_Idol = reader.ReadItem<IdolOfTheChampion>();
                        this.m_HasBeenAdvanced = reader.ReadBool();

                        goto case 3;
                    }
                case 3:
                    {
                        this.m_SpawnArea = reader.ReadRect2D();

                        goto case 2;
                    }
                case 2:
                    {
                        this.m_RandomizeType = reader.ReadBool();

                        goto case 1;
                    }
                case 1:
                    {
                        if (version < 3)
                        {
                            int oldRange = reader.ReadInt();

                            this.m_SpawnArea = new Rectangle2D(new Point2D(this.X - oldRange, this.Y - oldRange), new Point2D(this.X + oldRange, this.Y + oldRange));
                        }

                        this.m_Kills = reader.ReadInt();

                        goto case 0;
                    }
                case 0:
                    {
                        if (version < 1)
                            this.m_SpawnArea = new Rectangle2D(new Point2D(this.X - 24, this.Y - 24), new Point2D(this.X + 24, this.Y + 24));	//Default was 24

                        bool active = reader.ReadBool();
                        this.m_Type = (ChampionSpawnType)reader.ReadInt();
                        this.m_Creatures = reader.ReadStrongMobileList();
                        this.m_RedSkulls = reader.ReadStrongItemList();
                        this.m_WhiteSkulls = reader.ReadStrongItemList();
                        this.m_Platform = reader.ReadItem<ChampionPlatform>();
                        this.m_Altar = reader.ReadItem<ChampionAltar>();
                        this.m_ExpireDelay = reader.ReadTimeSpan();
                        this.m_ExpireTime = reader.ReadDeltaTime();
                        this.m_Champion = reader.ReadMobile();
                        this.m_RestartDelay = reader.ReadTimeSpan();

                        if (reader.ReadBool())
                        {
                            this.m_RestartTime = reader.ReadDeltaTime();
                            this.BeginRestart(this.m_RestartTime - DateTime.UtcNow);
                        }

                        if (version < 4)
                        {
                            this.m_Idol = new IdolOfTheChampion(this);
                            this.m_Idol.MoveToWorld(new Point3D(this.X, this.Y, this.Z - 15), this.Map);
                        }

                        if (this.m_Platform == null || this.m_Altar == null || this.m_Idol == null)
                            this.Delete();
                        else if (active)
                            this.Start();
//.........这里部分代码省略.........
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:101,代码来源:ChampionSpawn.cs

示例6: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			m_Owner = reader.ReadMobile();
			m_EquippedItems = reader.ReadStrongItemList();

			m_BackpackContent = new List<LocationStorage>();
			int BackpackContentAmount = reader.ReadInt();

			for( int i = 0; i < BackpackContentAmount; ++i )
				m_BackpackContent.Add( LocationStorage.Deserialize( reader ) );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:14,代码来源:EquipmentStorage.cs

示例7: Deserialize


//.........这里部分代码省略.........
								m_DoneQuests.Add(new QuestRestartInfo(questType, restartTime));
							}
						}

						m_Profession = reader.ReadEncodedInt();
						goto case 15;
					}
				case 15:
					{
						m_LastCompassionLoss = reader.ReadDeltaTime();
						goto case 14;
					}
				case 14:
					{
						m_CompassionGains = reader.ReadEncodedInt();

						if (m_CompassionGains > 0)
						{
							m_NextCompassionDay = reader.ReadDeltaTime();
						}

						goto case 13;
					}
				case 13: // just removed m_PayedInsurance list
				case 12:
					{
						m_BOBFilter = new BOBFilter(reader);
						goto case 11;
					}
				case 11:
					{
						if (version < 13)
						{
							var payed = reader.ReadStrongItemList();

							for (int i = 0; i < payed.Count; ++i)
							{
								payed[i].PayedInsurance = true;
							}
						}

						goto case 10;
					}
				case 10:
					{
						if (reader.ReadBool())
						{
							m_HairModID = reader.ReadInt();
							m_HairModHue = reader.ReadInt();
							m_BeardModID = reader.ReadInt();
							m_BeardModHue = reader.ReadInt();
						}

						goto case 9;
					}
				case 9:
					{
						SavagePaintExpiration = reader.ReadTimeSpan();

						if (SavagePaintExpiration > TimeSpan.Zero)
						{
							BodyMod = (Female ? 184 : 183);
							HueMod = 0;
						}

						goto case 8;
开发者ID:Crome696,项目名称:ServUO,代码行数:67,代码来源:PlayerMobile.cs

示例8: Deserialize

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

			switch( version )
			{
				case 5:
				case 4:
				{
					m_Signpost = reader.ReadItem();
					m_SignpostGraphic = reader.ReadInt();

					goto case 3;
				}
				case 3:
				{
					m_Type = (FoundationType)reader.ReadInt();

					goto case 2;
				}
				case 2:
				{
					m_SignHanger = reader.ReadItem();

					goto case 1;
				}
				case 1:
				{
					if( version < 5 )
						m_DefaultPrice = reader.ReadInt();

					goto case 0;
				}
				case 0:
				{
					if( version < 3 )
						m_Type = FoundationType.Stone;

					if( version < 4 )
						m_SignpostGraphic = 9;

					m_LastRevision = reader.ReadInt();
					m_Fixtures = reader.ReadStrongItemList();

					m_Current = new DesignState( this, reader );
					m_Design = new DesignState( this, reader );
					m_Backup = new DesignState( this, reader );

					break;
				}
			}

			base.Deserialize( reader );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:54,代码来源:HouseFoundation.cs

示例9: Deserialize

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

            int version = reader.ReadInt();

            ScoreModifier = 1.0;

            switch (version)
            {
                case 3:
                    {
                        ScoringType = (Scoring) reader.ReadInt();
                        ScoreModifier = reader.ReadDouble();
                        goto case 2;
                    }
                case 2:
                    {
                        m_EventSupplier = reader.ReadItem<EventSupplier>();
                        m_UseSphereRules = reader.ReadBool();
                        m_GiveHorses = reader.ReadBool();
                        goto case 1;
                    }
                case 1:
                    {
                        m_MatchMin = reader.ReadInt();
                        m_LeaveLocation = reader.ReadPoint3D();
                        m_LeaveMap = reader.ReadMap();
                        goto case 0;
                    }
                case 0:
                    {
                        Started = reader.ReadBool();
                        m_Active = reader.ReadBool();
                        m_AcceptingContestants = reader.ReadBool();
                        m_DMSpawnPoints = reader.ReadStrongItemList<DMSpawnPoint>();

                        #region Verify loaded spawn points

                        List<DMSpawnPoint> removalList = new List<DMSpawnPoint>();
                        foreach (DMSpawnPoint dmSpawnPoint in m_DMSpawnPoints)
                            if (dmSpawnPoint.StoneLink != this)
                                removalList.Add(dmSpawnPoint);

                        foreach (DMSpawnPoint dmSpawnPoint in removalList)
                            m_DMSpawnPoints.Remove(dmSpawnPoint);

                        #endregion

                        m_MountCollection = ReadMountCollection(reader);
                        break;
                    }
            }

            m_Started = false;
            AcceptingContestants = false;
            Active = false;
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:58,代码来源:DMStone.cs

示例10: VendorInventory

		public VendorInventory(BaseHouse house, GenericReader reader)
		{
			House = house;

			reader.ReadEncodedInt();

			Owner = reader.ReadMobile();
			VendorName = reader.ReadString();
			ShopName = reader.ReadString();

			Items = reader.ReadStrongItemList();
			Currency = reader.ReadInt();

			ExpireTime = reader.ReadDeltaTime();

			if (Items.Count == 0 && Currency == 0)
			{
				Timer.DelayCall(TimeSpan.Zero, Delete);
			}
			else
			{
				TimeSpan delay = ExpireTime - DateTime.UtcNow;

				m_ExpireTimer = new ExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
				m_ExpireTimer.Start();
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:27,代码来源:VendorInventory.cs

示例11: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                case 0:
                    {
                        this.m_Components = reader.ReadStrongItemList<AddonComponent>();
                        break;
                    }
            }

            if (version < 1 && this.Weight == 0)
                this.Weight = -1;
        }
开发者ID:mcarriere,项目名称:ServUO,代码行数:19,代码来源:BaseAddon.cs

示例12: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
             		int version = reader.ReadInt();

             		int count = reader.ReadInt();

             		for( int i = 0; i < count; i++ )
             			TryToAddRank( reader.ReadInt(), new GuildRankInfo(reader) );

             			m_AlliedGuilds = (List<Item>)reader.ReadStrongItemList();
             			m_EnemyGuilds = (List<Item>)reader.ReadStrongItemList();
             			m_PayCycleInRLDays = reader.ReadInt();
             			m_Treasury = (Container)reader.ReadItem();
             			m_NextPay = reader.ReadDateTime();
             			m_OfficialGuild = reader.ReadBool();
             		m_ArmourHue = reader.ReadInt();
             		m_ClothingHue = reader.ReadInt();
             		m_Owner = (PlayerMobile)reader.ReadMobile();
             		m_OwnersName = reader.ReadString();
             		m_Members = reader.ReadStrongMobileList();
             		m_Applicants = reader.ReadStrongMobileList();

             		Guilds.Add( this );
            CustomGuildStone.CheckMemberActivity(this);
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:26,代码来源:CustomGuildStone.cs

示例13: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 27:
                case 26: m_BetaNerf = reader.ReadBool(); goto case 25;
                case 25: m_Components = reader.ReadStrongItemList(); goto case 24;
                case 24: m_NewCrafting = reader.ReadBool(); m_QualityDefense = reader.ReadInt(); goto case 23;
                case 23: m_HasHalo = reader.ReadBool(); goto case 22;
                case 22:
                case 21:
                case 20:
                {
                    m_QualityDamage = reader.ReadInt();
                    m_QualitySpeed = reader.ReadInt();
                    m_QualityAccuracy = reader.ReadInt();
                    goto case 19;
                }
                case 19:
                case 18:
                case 17:
                case 16:
                case 15:
                case 14:
                case 13:
                case 12:
                case 11:
                case 10:
                {
                    m_CraftersOriginalName = reader.ReadString();
                    goto case 9;
                }
                case 9:
                {
                    m_Engraved1 = reader.ReadString();
                    m_Engraved2 = reader.ReadString();
                    m_Engraved3 = reader.ReadString();
                    goto case 5;
                }
                case 8:
                case 7:
                case 6:
                case 5:
                {
                    SaveFlag flags = (SaveFlag)reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.DamageLevel ) )
                    {
                        m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();

                        if ( m_DamageLevel > WeaponDamageLevel.Vanq )
                            m_DamageLevel = WeaponDamageLevel.Ruin;
                    }

                    if ( GetSaveFlag( flags, SaveFlag.AccuracyLevel ) )
                    {
                        m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();

                        if ( m_AccuracyLevel > WeaponAccuracyLevel.Supremely )
                            m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
                    }

                    if ( GetSaveFlag( flags, SaveFlag.DurabilityLevel ) )
                    {
                        m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();

                        if ( m_DurabilityLevel > WeaponDurabilityLevel.Indestructible )
                            m_DurabilityLevel = WeaponDurabilityLevel.Durable;
                    }

                    if ( GetSaveFlag( flags, SaveFlag.Quality ) )
                        m_Quality = (WeaponQuality)reader.ReadInt();
                    else
                        m_Quality = WeaponQuality.Regular;

                    if ( GetSaveFlag( flags, SaveFlag.Hits ) )
                        m_Hits = reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.MaxHits ) )
                        m_MaxHits = reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.Slayer ) )
                        m_Slayer = (SlayerName)reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.Poison ) )
                        m_Poison = Poison.Deserialize( reader );

                    if ( GetSaveFlag( flags, SaveFlag.PoisonCharges ) )
                        m_PoisonCharges = reader.ReadInt();

                    if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
                        m_Crafter = reader.ReadMobile();

                    if ( GetSaveFlag( flags, SaveFlag.Identified ) )
                        m_Identified = ( version >= 6 || reader.ReadBool() );

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

示例14: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                    m_Instance = reader.ReadItem() as PrimevalLichPuzzle;
                    this.m_Altar = reader.ReadItem() as ChampionSpawn;
                    this.m_Key = reader.ReadLong();
                    this.m_Successful = reader.ReadMobile();
                    this.m_Levers = reader.ReadStrongItemList<PrimevalLichPuzzleLever>();
                    break;
            }

            if (null == this.m_Levers)
                this.m_Levers = new List<PrimevalLichPuzzleLever>();
            //            if ( null != m_Instance && m_Instance.Deleted && this == m_Instance )
            //            {
            //                m_Instance = null;
            //                return;
            //            }
            //            // remove if no altar exists
            //            if ( null == m_Altar )
            //                Timer.DelayCall( TimeSpan.FromSeconds( 0.0 ), new TimerCallback( Delete ) );
            //            ResetLevers();
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:29,代码来源:PrimevalLichPuzzle.cs

示例15: Deserialize

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

            int version = reader.ReadEncodedInt();

            this.m_Components = reader.ReadStrongItemList<PlagueBeastComponent>();
            this.m_BrainHue = reader.ReadInt();
            this.m_Opened = reader.ReadBool();
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:10,代码来源:PlagueBeastOrgans.cs


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