示例#1
0
        public void BeginTimer()
        {
            EndTimer();

            DecayTimer = Timer.DelayCall(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10), CheckDecay);
            DecayTimer.Start();
        }
示例#2
0
        public Food(int amount, int itemID)
            : base(itemID)
        {
            Stackable    = true;
            Amount       = amount;
            m_FillFactor = 1;
            m_SeedType   = null;

            DecayTimer timer = new DecayTimer
                                   (TimeSpan.FromHours(12), this);

            timer.Start();
        }
		public void DoDecayTimer(TimeSpan delay)
		{

			if (m_DecayTimer != null)
				m_DecayTimer.Stop();
			if (!m_Decays) return;
			m_DecayTimer = new DecayTimer(this, delay);
			m_DecayTimer.Start();
			m_DecayRunning = true;
			m_DecayEnd = DateTime.Now + delay;
		}
示例#4
0
        // no draw tile
        private SpeechItem( Mobile m )
            : base(0x2198)
        {
            Movable = false;

            m_Owner = m;

            m_DecayTimer = new DecayTimer( this );
            m_DecayTimer.Start();
        }
示例#5
0
 public SpeechItem( Serial s )
     : base(s)
 {
     m_DecayTimer = new DecayTimer( this );
     m_DecayTimer.Start();
 }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();

			m_OpenedBy = reader.ReadMobile();

			if ( reader.ReadBool() )
			{
				int count = reader.ReadInt();
				int deadline = reader.ReadInt();

				m_Timer = new DecayTimer( this, count, deadline );
				m_Timer.Start();
			}

			if ( FightMode == FightMode.None )
				Frozen = true;
		}
		public virtual void OnParalyzed( Mobile from )
		{
			FightMode = FightMode.None;
			Frozen = true;
			Blessed = true;
			Combatant = null;
			Hue = 0x480;
			from.Combatant = null;
			from.Warmode = false;

			m_Timer = new DecayTimer( this );
			m_Timer.Start();

			Timer.DelayCall( TimeSpan.Zero, new TimerCallback( BroadcastMessage ) );
		}
示例#8
0
        public static void Initialize()
        {
            DecayTimer MoveSpawnerDecay_timer = new DecayTimer();

            MoveSpawnerDecay_timer.Start();
        }
示例#9
0
 public static void Initialize()
 {
     DecayTimer MoveSpawnerDecay_timer = new DecayTimer();
     MoveSpawnerDecay_timer.Start();
 }
		protected void StartDecayTimer()
		{
			_DecayTimer = new DecayTimer( this );
			_DecayTimer.Start();
			
		}
示例#11
0
 public SpeechItem(Serial s)
     : base(s)
 {
     // decay immediately on server up
     m_DecayTimer = new DecayTimer(this);
     m_DecayTimer.Delay = TimeSpan.Zero;
     m_DecayTimer.Start();
 }
示例#12
0
文件: Food.cs 项目: ITLongwell/Ulmeta
        public Food( int amount, int itemID )
            : base(itemID)
        {
            Stackable = true;
            Amount = amount;
            m_FillFactor = 1;
            m_SeedType = null;

            DecayTimer timer = new DecayTimer
                (TimeSpan.FromHours(12), this);
            timer.Start();
        }