Esempio n. 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);
            }
        }
Esempio n. 2
0
        protected void RestoreBarrier()
        {
            for (var index = 0; index < m_Barriers.Count; index++)
            {
                EnergyBarrier barrier = m_Barriers[index];
                barrier.Active = true;
            }

            for (var index = 0; index < m_BarrierLocations.Length; index++)
            {
                Point3D loc = m_BarrierLocations[index];

                Blocker blocker = new Blocker();

                blocker.MoveToWorld(loc, Map);
                m_Blockers.Add(blocker);

                LOSBlocker losblocker = new LOSBlocker();

                losblocker.MoveToWorld(loc, Map);
                m_LOSBlockers.Add(losblocker);
            }

            Visible = true;
        }
Esempio n. 3
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();
            }
        }