當前位置: 首頁>>代碼示例>>C#>>正文


C# GenericReader.ReadDouble方法代碼示例

本文整理匯總了C#中Server.GenericReader.ReadDouble方法的典型用法代碼示例。如果您正苦於以下問題:C# GenericReader.ReadDouble方法的具體用法?C# GenericReader.ReadDouble怎麽用?C# GenericReader.ReadDouble使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.GenericReader的用法示例。


在下文中一共展示了GenericReader.ReadDouble方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                {
                    m_MinSkill = reader.ReadDouble();
                    m_MaxSkill = reader.ReadDouble();

                    if ( m_MinSkill == 0.0 && m_MaxSkill == 30.0 )
                    {
                        m_MinSkill = -25.0;
                        m_MaxSkill = +25.0;
                    }

                    break;
                }
            }

            UpdateItemID();
        }
開發者ID:Godkong,項目名稱:Origins,代碼行數:25,代碼來源:PickpocketDips.cs

示例2: ExtendedDeserialize

		public void ExtendedDeserialize( GenericReader reader, int parentVerison )
		{
			int version = reader.ReadInt();

			switch (version)
			{

                                 case 3:
                                 {
					m_PopUpToggle = reader.ReadBool();
                                        goto case 2;
                                 }
                                 case 2:
                                 {
				 	Percent = reader.ReadDouble();
                                 	m_LevelTitle = reader.ReadString();
                                        m_PlayerLevel = reader.ReadInt();
                                        goto case 1;
                                 }

				case 1:
				{
					m_Settings = new MobileSettings(this);
					m_Settings.Deserialize(reader);
					goto case 0;
				}
				case 0:
				{
					m_TravelTickets = reader.ReadInt();
					break;
				}
			}
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:33,代碼來源:AedilisPlayerMobile.cs

示例3: Deserialize

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

			int version = reader.ReadInt();
			// version 0
			m_DataValue = reader.ReadDouble();
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:8,代碼來源:XmlDouble.cs

示例4: Deserialize

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

            int version = reader.ReadInt();

            m_Duration = reader.ReadDouble();
            m_Chance = reader.ReadInt();
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:9,代碼來源:XmlMiniFreeze.cs

示例5: SkillGainMod

		public SkillGainMod( PlayerMobile owner, GenericReader reader )
		{
			int version = reader.ReadEncodedInt();

			m_Owner = owner;
			m_Name = reader.ReadString();
			m_Skill = (SkillName)reader.ReadInt();
			m_Bonus = reader.ReadDouble();
			m_Duration = reader.ReadTimeSpan();
			m_Added = reader.ReadDateTime();
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:11,代碼來源:SkillGainMod.cs

示例6: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Value = reader.ReadDouble();
					break;
				}
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:15,代碼來源:TokenScroll.cs

示例7: Deserialize

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

            m_HueDelay = reader.ReadDouble();
            m_HueStart = reader.ReadInt();
            m_HueStop = reader.ReadInt();
            m_IsCycling = reader.ReadBool();
            m_HasCost = reader.ReadBool();

            if ( m_IsCycling )
            {
                DoHueTimer();
            }
        }
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:16,代碼來源:CyclingDyetub.cs

示例8: Deserialize

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

			int version = reader.ReadInt();

			int count = reader.ReadEncodedInt();

			m_Entries = new ArrayList( count );

			for ( int i = 0; i < count; ++i )
			{
				SkillName skill = (SkillName)reader.ReadEncodedInt();
				double amount = reader.ReadDouble();
                ScrollofTranscendence scroll = new ScrollofTranscendence(skill,amount);
				m_Entries.Add(scroll);
			}
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:18,代碼來源:ScrollofTranscendenceBook[1].cs

示例9: DeserializePlayerScores

		private static bool DeserializePlayerScores(GenericReader reader)
		{
			reader.GetVersion();

			reader.ReadBlockDictionary(
				() =>
				{
					IEntity e = reader.ReadEntity();

					Dictionary<Mobile, double> list = reader.ReadBlockDictionary(
						() =>
						{
							Mobile k = reader.ReadMobile();
							double v = reader.ReadDouble();

							return new KeyValuePair<Mobile, double>(k, v);
						});

					return new KeyValuePair<IEntity, Dictionary<Mobile, double>>(e, list);
				},
				Registry);

			return true;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:24,代碼來源:PlayerScores_Init.cs

示例10: Deserialize

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

            int version = reader.ReadEncodedInt();

            switch( version )
            {
                case 1:
                    {
                        m_ActiveItemID = reader.ReadInt();
                        m_InactiveItemID = reader.ReadInt();

                        goto case 0;
                    }
                case 0:
                    {
                        m_Account = reader.ReadString();
                        m_NextUse = reader.ReadDateTime();

                        m_Skill = (SkillName)reader.ReadEncodedInt();
                        m_SkillValue = reader.ReadDouble();
                        break;
                    }
            }

            if( version == 0 )
            {
                m_ActiveItemID = 0x2A94;
                m_InactiveItemID = 0x2A93;
            }
        }
開發者ID:Godkong,項目名稱:Origins,代碼行數:32,代碼來源:SoulStone.cs

示例11: Deserialize

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

            int version = reader.ReadInt();

            m_CurrentAI = (AIType)reader.ReadInt();
            m_DefaultAI = (AIType)reader.ReadInt();

            m_iRangePerception = reader.ReadInt();
            m_iRangeFight = reader.ReadInt();

            m_iTeam = reader.ReadInt();

            m_dActiveSpeed = reader.ReadDouble();
            m_dPassiveSpeed = reader.ReadDouble();
            m_dCurrentSpeed = reader.ReadDouble();

            double activeSpeed = m_dActiveSpeed;
            double passiveSpeed = m_dPassiveSpeed;

            SpeedInfo.GetSpeeds( this, ref activeSpeed, ref passiveSpeed );

            bool isStandardActive = false;
            for ( int i = 0; !isStandardActive && i < m_StandardActiveSpeeds.Length; ++i )
                isStandardActive = ( m_dActiveSpeed == m_StandardActiveSpeeds[i] );

            bool isStandardPassive = false;
            for ( int i = 0; !isStandardPassive && i < m_StandardPassiveSpeeds.Length; ++i )
                isStandardPassive = ( m_dPassiveSpeed == m_StandardPassiveSpeeds[i] );

            if ( isStandardActive && m_dCurrentSpeed == m_dActiveSpeed )
                m_dCurrentSpeed = activeSpeed;
            else if ( isStandardPassive && m_dCurrentSpeed == m_dPassiveSpeed )
                m_dCurrentSpeed = passiveSpeed;

            if ( isStandardActive )
                m_dActiveSpeed = activeSpeed;

            if ( isStandardPassive )
                m_dPassiveSpeed = passiveSpeed;

            if ( m_iRangePerception == OldRangePerception )
                m_iRangePerception = DefaultRangePerception;

            m_pHome.X = reader.ReadInt();
            m_pHome.Y = reader.ReadInt();
            m_pHome.Z = reader.ReadInt();

            if ( version >= 1 )
            {
                m_iRangeHome = reader.ReadInt();

                int i, iCount;

                iCount = reader.ReadInt();
                for ( i=0; i< iCount; i++ )
                {
                    string str = reader.ReadString();
                    Type type = Type.GetType( str );

                    if ( type != null )
                    {
                        m_arSpellAttack.Add( type );
                    }
                }

                iCount = reader.ReadInt();
                for ( i=0; i< iCount; i++ )
                {
                    string str = reader.ReadString();
                    Type type = Type.GetType( str );

                    if ( type != null )
                    {
                        m_arSpellDefense.Add( type );
                    }
                }
            }
            else
            {
                m_iRangeHome = 0;
            }

            if ( version >= 2 )
            {
                m_FightMode = ( FightMode )reader.ReadInt();

                m_bControled = reader.ReadBool();
                m_ControlMaster = reader.ReadMobile();
                m_ControlTarget = reader.ReadMobile();
                m_ControlDest = reader.ReadPoint3D();
                m_ControlOrder = (OrderType) reader.ReadInt();

                m_dMinTameSkill = reader.ReadDouble();

                if ( version < 9 )
                    reader.ReadDouble();

                m_bTamable = reader.ReadBool();
//.........這裏部分代碼省略.........
開發者ID:cynricthehun,項目名稱:UOLegends,代碼行數:101,代碼來源:BaseCreature.cs

示例12: Deserialize

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

			switch ( version )
			{
				case 2:
				{
					m_Level = (SecureLevel)reader.ReadInt();
					m_Start = reader.ReadDateTime();
					m_BottleDuration = reader.ReadDouble();
					m_AllowBottling = reader.ReadBool();
					
					goto case 1;
				}
				case 1:	
				{
					SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();

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

					if ( GetSaveFlag( flags, SaveFlag.Quality ) )
						m_Quality = (WineQuality)reader.ReadEncodedInt();
					else
						m_Quality = WineQuality.Regular;
	
					if ( m_Quality == WineQuality.Low )
						m_Quality = WineQuality.Regular;

					if ( GetSaveFlag( flags, SaveFlag.Variety ) )
						m_Variety = (GrapeVariety)reader.ReadEncodedInt();
					else
						m_Variety = DefaultVariety;
	
					if ( m_Variety == GrapeVariety.None )
						m_Variety = DefaultVariety;
						
					break;
				}
			}
		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:47,代碼來源:WineKeg.cs

示例13: Deserialize

		public static Poison Deserialize( GenericReader reader )
		{
			switch ( reader.ReadByte() )
			{
				case 1: return GetPoison( reader.ReadByte() );
				case 2:
					//no longer used, safe to remove?
					reader.ReadInt();
					reader.ReadDouble();
					reader.ReadInt();
					reader.ReadTimeSpan();
					break;
			}
			return null;
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:15,代碼來源:Poison.cs

示例14: Deserialize

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

            int version = reader.ReadInt();

            switch( version )
            {
                case 0:
                {
                    m_Skill = (CraftSkillType)reader.ReadInt();
                    m_SkillLevel = reader.ReadDouble();
                    m_Crafter = reader.ReadMobile();

                    break;
                }
            }
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:18,代碼來源:RepairDeed.cs

示例15: Deserialize

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

			m_Combination = reader.ReadString();
			m_Area = reader.ReadString();
			m_Design = DesignTypes.FindDesign( reader.ReadString() );
			m_NormalHue = reader.ReadInt();
			m_ActivateHue = reader.ReadInt();
			m_DeactivateHue = reader.ReadInt();
			m_StartingPos = reader.ReadUInt();
			m_Reversed = reader.ReadBool();
			m_DropChance = reader.ReadDouble();
			m_GateHue = reader.ReadInt();
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:15,代碼來源:StargateDesign.cs


注:本文中的Server.GenericReader.ReadDouble方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。