示例#1
0
 protected void PlaySound()
 {
     if (Active)
     {
         Effects.PlaySound(Location, Map, Utility.RandomList(0x1DC, 0x210, 0x2F4));
         TimerRegistry.UpdateRegistry(_TimerID, this, TimeSpan.FromSeconds(Utility.RandomMinMax(5, 25)));
     }
     else
     {
         TimerRegistry.RemoveFromRegistry(_TimerID, this);
     }
 }
示例#2
0
        private void AutoShout_Callback()
        {
            TownCrierEntry tce = GetRandomEntry();

            if (tce == null)
            {
                TimerRegistry.RemoveFromRegistry(_AutoShoutTimerID, this);
            }
            else if (m_NewsTimer == null)
            {
                m_NewsTimer = Timer.DelayCall(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(3.0), new TimerStateCallback(ShoutNews_Callback), new object[] { tce, 0 });

                PublicOverheadMessage(MessageType.Regular, 0x3B2, 502976); // Hear ye! Hear ye!
            }
        }
示例#3
0
        public void Stop()
        {
            if (!m_Active || Deleted)
            {
                return;
            }

            m_Active = false;
            m_Level  = 0;

            ClearSpawn();
            Despawn();

            TimerRegistry.RemoveFromRegistry(m_TimerID, this);
            TimerRegistry.RemoveFromRegistry(m_RestartTimerID, this);

            InvalidateProperties();
        }
示例#4
0
        public void RemoveEntry(TownCrierEntry tce)
        {
            if (m_Entries == null)
            {
                return;
            }

            m_Entries.Remove(tce);

            if (m_Entries.Count == 0)
            {
                m_Entries = null;
            }

            if (m_Entries == null && GlobalTownCrierEntryList.Instance.IsEmpty)
            {
                TimerRegistry.RemoveFromRegistry(_AutoShoutTimerID, this);
            }
        }
 public override void OnSectorDeactivate()
 {
     TimerRegistry.RemoveFromRegistry(_TimerID, this);
 }
示例#6
0
 private void DeactivateTimer()
 {
     TimerRegistry.RemoveFromRegistry(_TimerID, this);
 }
 public void StopTimer()
 {
     TimerRegistry.RemoveFromRegistry(TimerID, this);
 }
示例#8
0
 public virtual void StopTimer()
 {
     TimerRegistry.RemoveFromRegistry <QuestSystem>(_TimerID, this);
 }