예제 #1
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();
            }
        }
예제 #2
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);
            }
        }
예제 #3
0
        protected override void OnTick()
        {
            if (DateTime.Now < m_Start)
            {
                World.Broadcast(m_Stone.CTFMessageHue, true, m_Stone.CTFJoinMessage);
            }
            else if (m_Stone != null && m_Stone.Validate())
            {
                if (m_Blocker != null)
                {
                    m_Blocker.Delete();
                }

                if (m_Stone.Doors != null)
                {
                    List <BaseDoor> list = m_Stone.Doors.GetChain();

                    for (int i = 0; i < list.Count; ++i)
                    {
                        ((BaseDoor)list[i]).Open = false;
                    }
                }

                m_Stone.JoinStone.Visible = false;
                m_Stone.Game.OpenJoin     = false;

                World.Broadcast(m_Stone.CTFMessageHue, true, m_Stone.CTFStartMessage);

                m_Stone.Game.StartGame(false);

                Stop();
            }
            else
            {
                Stop();
            }
        }