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); } }
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! } }
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(); }
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); }
private void DeactivateTimer() { TimerRegistry.RemoveFromRegistry(_TimerID, this); }
public void StopTimer() { TimerRegistry.RemoveFromRegistry(TimerID, this); }
public virtual void StopTimer() { TimerRegistry.RemoveFromRegistry <QuestSystem>(_TimerID, this); }