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


C# GenericReader.ReadUInt方法代码示例

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


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

示例1: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Boat = reader.ReadItem() as BaseBoat;
					m_Side = (PlankSide) reader.ReadInt();
					m_Locked = reader.ReadBool();
					m_KeyValue = reader.ReadUInt();

					if ( m_Boat == null )
						Delete();

					break;
				}
			}

			if ( IsOpen )
			{
				m_CloseTimer = new CloseTimer( this );
				m_CloseTimer.Start();
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:28,代码来源:Plank.cs

示例2: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				case 0:
				{
					m_MultiID = reader.ReadInt();
					m_Offset = reader.ReadPoint3D();
					m_ShipName = reader.ReadString();

					if ( version == 0 )
						reader.ReadUInt();

					break;
				}
			}

			if ( LootType == LootType.Newbied )
				LootType = LootType.Blessed;

			if ( Weight == 0.0 )
				Weight = 1.0;
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:28,代码来源:BaseDockedBoat.cs

示例3: KeyInfo

		public KeyInfo( GenericReader reader )
		{
			int version = reader.ReadInt();

			m_KeyVal = reader.ReadUInt();
			m_Description = reader.ReadString();
			m_MaxRange = reader.ReadInt();
			m_Link = reader.ReadItem();
			m_Type = (KeyType)reader.ReadInt();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:10,代码来源:KeyRing.cs

示例4: Deserialize

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

			int version = reader.ReadInt();
			int count;
            bool loadedDynamicDecay = false;

			switch ( version )
			{
                case 16:
                    {
                        int stage = reader.ReadInt();

                        if (stage != -1)
                        {
                            m_CurrentStage = (DecayLevel)stage;
                            m_NextDecayStage = reader.ReadDateTime();
                            loadedDynamicDecay = true;
                        }

                        goto case 15;
                    }
                case 15: //Maka
                    {
                        m_HouseKeyVal = reader.ReadUInt();
                        goto case 14;
                    }
				case 14:
				{
					m_RelativeBanLocation = reader.ReadPoint3D();
					goto case 13;
				}
				case 13: // removed ban location serialization
				case 12:
				{
					m_VendorRentalContracts = reader.ReadItemList();
					m_InternalizedVendors = reader.ReadMobileList();

					int relocatedCount = reader.ReadEncodedInt();
					for ( int i = 0; i < relocatedCount; i++ )
					{
						Point3D relLocation = reader.ReadPoint3D();
						IEntity entity = World.FindEntity( reader.ReadInt() );

						if ( entity != null )
							m_RelocatedEntities.Add( new RelocatedEntity( entity, relLocation ) );
					}

					int inventoryCount = reader.ReadEncodedInt();
					for ( int i = 0; i < inventoryCount; i++ )
					{
						VendorInventory inventory = new VendorInventory( this, reader );
						m_VendorInventories.Add( inventory );
					}

					goto case 11;
				}
				case 11:
				{
					m_LastRefreshed = reader.ReadDateTime();
					m_RestrictDecay = reader.ReadBool();
					goto case 10;
				}
				case 10: // just a signal for updates
				case 9:
				{
					m_Visits = reader.ReadInt();
					goto case 8;
				}
				case 8:
				{
					m_Price = reader.ReadInt();
					goto case 7;
				}
				case 7:
				{
					m_Access = reader.ReadMobileList();
					goto case 6;
				}
				case 6:
				{
					m_BuiltOn = reader.ReadDateTime();
					m_LastTraded = reader.ReadDateTime();
					goto case 5;
				}
				case 5: // just removed fields
				case 4:
				{
					m_Addons = reader.ReadItemList();
					goto case 3;
				}
				case 3:
				{
					count = reader.ReadInt();
					m_Secures = new ArrayList( count );

					for ( int i = 0; i < count; ++i )
					{
						SecureInfo info = new SecureInfo( reader );
//.........这里部分代码省略.........
开发者ID:rberiot,项目名称:imaginenation,代码行数:101,代码来源:BaseHouse.cs

示例5: Deserialize

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

            int version = reader.ReadInt();

            switch ( version ) {
            case 0:
                drawing = reader.ReadUInt();

                for (uint i = 0; i < jackpot.Length; i++)
                    jackpot[i] = reader.ReadULong();

                for (uint i = 0; i < awards.Length; i++)
                    awards[i] = reader.ReadULong();

                award = reader.ReadULong();
                given = reader.ReadULong();
                destroyed = reader.ReadULong();
                mode = (LotteryBasketMode)reader.ReadInt();

                if (reader.ReadBool()) {
                    outcome = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        outcome[p] = reader.ReadUInt();
                }

                uint count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        data[p] = reader.ReadUInt();
                    RegisteredTicket rt = new RegisteredTicket(id, data);
                    rt.Class = reader.ReadInt();
                    tickets[id] = rt;
                }

                count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        data[p] = reader.ReadUInt();
                    incoming[id] = new RegisteredTicket(id, data);
                }

		board = reader.ReadItem();
		itemPrize = reader.ReadBool();
                break;

	    case 1:
	        drawing = reader.ReadUInt();

                for (uint i = 0; i < drawingCount.Length; i++)
                    drawingCount[i] = reader.ReadUInt();

                for (uint i = 0; i < jackpot.Length; i++)
                    jackpot[i] = reader.ReadULong();

                for (uint i = 0; i < awards.Length; i++)
                    awards[i] = reader.ReadULong();

		for (uint i = 0; i < winners.Length; i++)
                    winners[i] = reader.ReadInt();

		oldParticipants = reader.ReadUInt();

		award = reader.ReadULong();
                given = reader.ReadULong();
                destroyed = reader.ReadULong();
                mode = (LotteryBasketMode)reader.ReadInt();

                if (reader.ReadBool()) {
                    outcome = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        outcome[p] = reader.ReadUInt();
                }

                count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        data[p] = reader.ReadUInt();
                    RegisteredTicket rt = new RegisteredTicket(id, data);
                    rt.Class = reader.ReadInt();
                    tickets[id] = rt;
                }

                count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
		        data[p] = reader.ReadUInt();
                    incoming[id] = new RegisteredTicket(id, data);
                }

		board = reader.ReadItem();
		itemPrize = reader.ReadBool();
//.........这里部分代码省略.........
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:101,代码来源:LotteryBasket.cs

示例6: Deserialize

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

            int version = reader.ReadInt();

            m_Side = (PlankSide)reader.ReadInt();
            m_Locked = reader.ReadBool();
            m_KeyValue = reader.ReadUInt();

            if (IsOpen)
            {
                m_CloseTimer = new CloseTimer(this);
                m_CloseTimer.Start();
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:16,代码来源:Plank.cs

示例7: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
                /* Erzse - GuildID is now saved. */
                case 1:
                    {
                        m_Guild = reader.ReadEncodedInt();
                        goto case 0;
                    }
                /* end Erzse */

				case 0:
				{
					m_KeyValue = reader.ReadUInt();
					m_Open = reader.ReadBool();
					m_Locked = reader.ReadBool();
					m_OpenedID = reader.ReadInt();
					m_ClosedID = reader.ReadInt();
					m_OpenedSound = reader.ReadInt();
					m_ClosedSound = reader.ReadInt();
					m_Offset = reader.ReadPoint3D();
					m_Link = reader.ReadItem() as BaseDoor;

					m_Timer = new InternalTimer( this );

					if ( m_Open )
						m_Timer.Start();

					break;
				}
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:37,代码来源:BaseDoor.cs

示例8: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 2:
				{
					m_MaxRange = reader.ReadInt();

					goto case 1;
				}
				case 1:
				{
					m_Link = reader.ReadItem();

					goto case 0;
				}
				case 0:
				{
					if ( version < 2 || m_MaxRange == 0 )
						m_MaxRange = 3;

					m_Description = reader.ReadString();

					m_KeyVal = reader.ReadUInt();

					break;
				}
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:33,代码来源:Key.cs

示例9: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 7:
                    {
                        m_Locker = reader.ReadMobile();

                        goto case 6;
                    }
				case 6:
					{
						this.m_Crafter = reader.ReadMobile();

						goto case 5;
					}
                case 5:
                    {
                        this.m_IsShipwreckedItem = reader.ReadBool();

                        goto case 4;
                    }
                case 4:
                    {
                        this.m_RequiredSkill = reader.ReadInt();

                        goto case 3;
                    }
                case 3:
                    {
                        this.m_MaxLockLevel = reader.ReadInt();

                        goto case 2;
                    }
                case 2:
                    {
                        this.m_KeyValue = reader.ReadUInt();

                        goto case 1;
                    }
                case 1:
                    {
                        this.m_LockLevel = reader.ReadInt();

                        goto case 0;
                    }
                case 0:
                    {
                        if (version < 3)
                            this.m_MaxLockLevel = 100;

                        if (version < 4)
                        {
                            if ((this.m_MaxLockLevel - this.m_LockLevel) == 40)
                            {
                                this.m_RequiredSkill = this.m_LockLevel + 6;
                                this.m_LockLevel = this.m_RequiredSkill - 10;
                                this.m_MaxLockLevel = this.m_RequiredSkill + 39;
                            }
                            else
                            {
                                this.m_RequiredSkill = this.m_LockLevel;
                            }
                        }

                        this.m_Locked = reader.ReadBool();

                        break;
                    }
            }
        }
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:75,代码来源:LockableContainer.cs

示例10: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Boat = reader.ReadItem() as BaseGalleon;
					m_Side = (BoatRopeSide) reader.ReadInt();
					m_Locked = reader.ReadBool();
					m_KeyValue = reader.ReadUInt();
					
					if ( m_Boat == null )
						Delete();

					break;
				}
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:22,代码来源:GalleonComponents.cs

示例11: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 8:
                case 7:
                case 6:
                case 5:
                {
                    SaveFlag flags = (SaveFlag)reader.ReadUInt();

                    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() );

                    if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
                        m_StrReq = reader.ReadInt();
                    else
                        m_StrReq = -1;

                    if ( GetSaveFlag( flags, SaveFlag.DexReq ) )
                        m_DexReq = reader.ReadInt();
                    else
                        m_DexReq = -1;

                    if ( GetSaveFlag( flags, SaveFlag.IntReq ) )
                        m_IntReq = reader.ReadInt();
                    else
                        m_IntReq = -1;

                    if ( GetSaveFlag( flags, SaveFlag.MinDamage ) )
                        m_MinDamage = reader.ReadInt();
                    else
                        m_MinDamage = -1;

                    if ( GetSaveFlag( flags, SaveFlag.MaxDamage ) )
                        m_MaxDamage = reader.ReadInt();
                    else
                        m_MaxDamage = -1;

                    if ( GetSaveFlag( flags, SaveFlag.HitSound ) )
                        m_HitSound = reader.ReadInt();
                    else
                        m_HitSound = -1;

                    if ( GetSaveFlag( flags, SaveFlag.MissSound ) )
                        m_MissSound = reader.ReadInt();
                    else
                        m_MissSound = -1;

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

示例12: Deserialize

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

            int version = reader.ReadInt();

            version = reader.ReadInt();

            if (version > 8)
                m_RelockOnClose = reader.ReadBool();

            if (version > 7)
                m_Picker = reader.ReadMobile();

            if( version > 6 )
                m_ClosesAutomatically = reader.ReadBool();

            m_TrapLevel = reader.ReadInt();
            m_TrapPower = reader.ReadInt();
            m_TrapType = (TrapType)reader.ReadInt();
            m_TrapOnLockpick = reader.ReadBool();
            m_RequiredSkill = reader.ReadInt();
            m_MaxLockLevel = reader.ReadInt();
            m_LockLevel = reader.ReadInt();

            m_KeyValue = reader.ReadUInt();

            m_Open = reader.ReadBool();
            m_Locked = reader.ReadBool();
            m_OpenedID = reader.ReadInt();
            m_ClosedID = reader.ReadInt();
            m_OpenedSound = reader.ReadInt();
            m_ClosedSound = reader.ReadInt();
            m_Offset = reader.ReadPoint3D();
            m_Link = reader.ReadItem() as BaseDoor;

            m_Timer = new InternalTimer( this );

            if ( m_Open && m_ClosesAutomatically )
                m_Timer.Start();

            if( this.LockLevel < 100 )
                this.LockLevel = 100;

            if( this.RequiredSkill < 100 )
                this.RequiredSkill = 100;
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:47,代码来源:BaseDoor.cs

示例13: Deserialize

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

            int version = reader.ReadInt();

            switch (version) {
            case 1:
                if (reader.ReadBool()) {
                    data = new uint[LotteryConstants.Picks];
                    for (uint i = 0; i < LotteryConstants.Picks; i++)
                        data[i] = reader.ReadUInt();
                    drawing = reader.ReadUInt();
                }
                break;
            }
        }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:LotteryTicket.cs

示例14: Deserialize

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

            int version = reader.ReadInt();
            // version 0
            this.m_Names = reader.ReadUInt();
            this.m_Values = new int[reader.ReadEncodedInt()];

            for (int i = 0; i < this.m_Values.Length; ++i)
                this.m_Values[i] = reader.ReadEncodedInt();
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:12,代码来源:XmlAosAttributes.cs

示例15: Deserialize

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

			int version = reader.ReadInt();

			switch( version ) {

				case 2: {
						_lockLevel = reader.ReadInt();
						_maxLockLevel = reader.ReadInt();
						_requiredSkill = reader.ReadInt();
						_hasLock = reader.ReadBool();

						goto case 1;
					}
				case 1: {
						_timed = reader.ReadBool();
						_timeToClose = reader.ReadTimeSpan();

						goto case 0;
					}
				case 0: {
						m_KeyValue = reader.ReadUInt();
						m_Open = reader.ReadBool();
						m_Locked = reader.ReadBool();
						m_OpenedID = reader.ReadInt();
						m_ClosedID = reader.ReadInt();
						m_OpenedSound = reader.ReadInt();
						m_ClosedSound = reader.ReadInt();
						m_Offset = reader.ReadPoint3D();
						m_Link = reader.ReadItem() as BaseDoor;

						break;
					}
			}
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:36,代码来源:BaseDoor.cs


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