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


C# GenericReader.ReadTimeSpan方法代码示例

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


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

示例1: Deserialize

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

			int version = reader.ReadEncodedInt();

			m_Winner = reader.ReadString();
			m_Loser = reader.ReadString();
			m_GameEnd = reader.ReadDateTime();
			m_GameTime = reader.ReadTimeSpan();
			m_WinnerTime = reader.ReadTimeSpan();
			m_LoserTime = reader.ReadTimeSpan();
			m_WinnerScore = reader.ReadInt();
			m_LoserScore = reader.ReadInt();
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:15,代码来源:WinnerPaper.cs

示例2: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                {
                    m_GameTimeMax = reader.ReadTimeSpan();
                    m_AgeMax = reader.ReadTimeSpan();
                    m_UseGameTime = reader.ReadBool();
                    m_UseAge = reader.ReadBool();

                    break;
                }
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:19,代码来源:AgeTeleporter.cs

示例3: Deserialize

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

            m_LifeSpan = reader.ReadTimeSpan();
            m_CreationTime = reader.ReadDateTime();

            m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 5 ), TimeSpan.FromSeconds( 5 ), new TimerCallback( CheckExpiry ) );
        }
开发者ID:nathanvy,项目名称:runuo,代码行数:10,代码来源:TransientItem.cs

示例4: Deserialize

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

            int version = reader.ReadInt();

            m_Summoned = reader.ReadMobile();
            m_ManaCost = reader.ReadInt();
            m_CoolDown = reader.ReadTimeSpan();
            m_NextUseAllowed = reader.ReadDateTime();
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:11,代码来源:XmlSpiritSummoning.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: Load

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

            c_Text = reader.ReadString();
            c_Name = reader.ReadString();
            c_Gump = reader.ReadBool();
            c_AntiMacro = reader.ReadBool();
            c_Recur = reader.ReadTimeSpan();

            StartNotify();
        }
开发者ID:Jascen,项目名称:UOSmart,代码行数:12,代码来源:Notification.cs

示例7: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			b_switchon = reader.ReadBool();
			t_autotime = reader.ReadTimeSpan();
			t_RestartTime = reader.ReadDateTime();
			if (b_switchon)
			{
				I_Auto_Restarter tmr = new I_Auto_Restarter(this);
				tmr.Start();
			}
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:13,代码来源:AutoRestarterItem.cs

示例8: Deserialize

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

            m_TimeDelay = reader.ReadTimeSpan();
            m_iEventRange = reader.ReadInt();

            if (version < 1)
                reader.ReadDateTime();

            m_sMessage = reader.ReadString();
            m_tCheck = (CursedCaveUtility.CCTriggerCheck)reader.ReadInt();
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:14,代码来源:CCTrigger.cs

示例9: Deserialize

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

			int version = reader.ReadInt();

			int count;
			count = reader.ReadInt();
			for (int i = 0; i < count; i++)
				m_WallCoordinates.Add(reader.ReadPoint3D());

			count = reader.ReadInt();
			for (int i = 0; i < count; i++)
				m_StartLocations.Add(reader.ReadPoint3D());

			m_GameTime = reader.ReadTimeSpan();
			m_RegionControl = reader.ReadItem() as BMregion;
			m_ExitLosers = reader.ReadPoint3D();

			if (version >= 1)
			{
				m_LinkBombs = reader.ReadBool();
				m_ChanceForUpgrade = reader.ReadInt();

				if (version >= 2)
				{
					m_DanageWhileFS = reader.ReadBool();

					if (version >= 3)
						m_WriteScoreboard = reader.ReadBool();
					{
						if (version >= 4)
						{
							m_ExitWinner = reader.ReadPoint3D();
							m_ExitOnDraw = reader.ReadPoint3D();
							m_AutoStart = reader.ReadBool();
							m_KeepOpenJoin = reader.ReadBool();
						}
					}
				}
			}

			m_Running = false;
			m_OpenJoin = false;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:45,代码来源:BomberManGame.cs

示例10: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					int count = reader.ReadInt();

					for ( int i = 0; i < count; ++i )
					{
						Mobile m = reader.ReadMobile();
						DisguiseTimers.CreateTimer( m, reader.ReadTimeSpan() );
						m.NameMod = reader.ReadString();
					}

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

示例11: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                {
                    m_BombHome = reader.ReadPoint3D();

                    m_Duration = reader.ReadTimeSpan();

                    m_TeamInfo = new BRTeamInfo[reader.ReadEncodedInt()];

                    for ( int i = 0; i < m_TeamInfo.Length; ++i )
                        m_TeamInfo[i] = new BRTeamInfo( i, reader );

                    break;
                }
            }
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:23,代码来源:BombingRun.cs

示例12: WarDeclaration

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

            switch ( version )
            {
                case 0:
                {
                    m_Kills = reader.ReadInt();
                    m_MaxKills = reader.ReadInt();

                    m_WarLength = reader.ReadTimeSpan();
                    m_WarBeginning = reader.ReadDateTime();

                    m_Guild = reader.ReadGuild() as Guild;
                    m_Opponent = reader.ReadGuild() as Guild;

                    m_WarRequester = reader.ReadBool();

                    break;
                }
            }
        }
开发者ID:Leodinas,项目名称:uolite,代码行数:23,代码来源:Guild.cs

示例13: Deserialize

            public void Deserialize(GenericReader reader)
            {
                int version = reader.ReadInt();
                switch (version)
                {
                    case 1:
                        Flags = (KeywordFlags)reader.ReadInt();
                        goto case 0;
                    case 0:
                        m_Spawner = (XmlSpawner)reader.ReadItem();
                        Type = reader.ReadInt();
                        Serial = reader.ReadInt();
                        if (Type == 0)
                        {
                            // get any timer info
                            TimeSpan delay = reader.ReadTimeSpan();
                            m_Delay = reader.ReadTimeSpan();
                            m_Condition = reader.ReadString();
                            m_Goto = reader.ReadInt();

                            TimeSpan timeoutdelay = reader.ReadTimeSpan();
                            m_TimeoutEnd = DateTime.Now + timeoutdelay;
                            m_Timeout = reader.ReadTimeSpan();
                            m_TrigMob = reader.ReadMobile();

                            this.DoTimer(delay, m_Delay, m_Condition, m_Goto);
                        }
                        break;
                }
            }
开发者ID:greeduomacro,项目名称:divinity,代码行数:30,代码来源:BaseXmlSpawner.cs

示例14: Deserialize

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

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

            int version = reader.ReadInt();

            switch (version)
            {
                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;

                            m_DamageEntries.Add(m, damage);
                        }

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

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

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

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

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

                        m_Kills = reader.ReadInt();

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

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

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

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

                        if (m_Platform == null || m_Altar == null || m_Idol == null)
                            Delete();
                        else if (active)
                            Start();

                        break;
                    }
            }

            Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion));
//.........这里部分代码省略.........
开发者ID:PepeBiondi,项目名称:runsa,代码行数:101,代码来源:ChampionSpawn.cs

示例15: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
			int version = reader.ReadInt();
			switch (version)
			{
				case 1:
					{
						m_Cost = reader.ReadInt();
						m_AmountCollected = reader.ReadLong();
						goto case 0;
					}

				case 0:
					{
						m_Active = reader.ReadBool();
						m_Decays = reader.ReadBool();
						m_DecayTime = reader.ReadTimeSpan();
						if (reader.ReadBool())
							m_RuneBooks = reader.ReadItemList();
						if (m_Decays)
							m_TimeLeft = reader.ReadTimeSpan();
						LootType = LootType.Blessed;
						break;
					}
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:27,代码来源:MoongateLibrary.cs


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