예제 #1
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            string mantra = e.Speech.ToLower();

            if (Visible && e.Mobile.InRange(this, 2) && mantra == "ord")
            {
                Visible = false;

                for (var index = 0; index < m_Barriers.Count; index++)
                {
                    EnergyBarrier barrier = m_Barriers[index];
                    barrier.Active = false;
                }

                for (var index = 0; index < m_Blockers.Count; index++)
                {
                    Blocker blocker = m_Blockers[index];
                    blocker.Delete();
                }

                for (var index = 0; index < m_LOSBlockers.Count; index++)
                {
                    LOSBlocker losblocker = m_LOSBlockers[index];
                    losblocker.Delete();
                }

                m_Blockers.Clear();
                m_LOSBlockers.Clear();

                Timer.DelayCall(TimeSpan.FromMinutes(2.0), RestoreBarrier);
            }
        }
예제 #2
0
        public override void OnAfterDelete()
        {
            base.OnAfterDelete();

            for (var index = 0; index < m_Blockers.Count; index++)
            {
                Blocker blocker = m_Blockers[index];
                blocker.Delete();
            }

            for (var index = 0; index < m_LOSBlockers.Count; index++)
            {
                LOSBlocker losblocker = m_LOSBlockers[index];
                losblocker.Delete();
            }

            for (var index = 0; index < m_MsgTriggers.Count; index++)
            {
                SBMessageTrigger trigger = m_MsgTriggers[index];
                trigger.Delete();
            }

            for (var index = 0; index < m_Barriers.Count; index++)
            {
                EnergyBarrier barrier = m_Barriers[index];
                barrier.Delete();
            }
        }