コード例 #1
0
        public override void OnAfterDelete()
        {
            base.OnAfterDelete();

            if (m_Platform != null)
            {
                m_Platform.Delete();
            }

            if (m_Altar != null)
            {
                m_Altar.Delete();
            }

            if (m_RedSkulls != null)
            {
                for (int i = 0; i < m_RedSkulls.Count; ++i)
                {
                    ((Item)m_RedSkulls[i]).Delete();
                }

                m_RedSkulls.Clear();
            }

            if (m_WhiteSkulls != null)
            {
                for (int i = 0; i < m_WhiteSkulls.Count; ++i)
                {
                    ((Item)m_WhiteSkulls[i]).Delete();
                }

                m_WhiteSkulls.Clear();
            }

            if (m_Creatures != null)
            {
                for (int i = 0; i < m_Creatures.Count; ++i)
                {
                    Mobile mob = (Mobile)m_Creatures[i];

                    if (!mob.Player)
                    {
                        mob.Delete();
                    }
                }

                m_Creatures.Clear();
            }

            if (m_Champion != null && !m_Champion.Player)
            {
                m_Champion.Delete();
            }

            Stop();
        }
コード例 #2
0
ファイル: ChampionSpawn.cs プロジェクト: nogu3ira/xrunuo
        public override void OnAfterDelete()
        {
            base.OnAfterDelete();

            if (m_Platform != null)
            {
                m_Platform.Delete();
            }

            if (m_Altar != null)
            {
                m_Altar.Delete();
            }

            if (m_Idol != null)
            {
                m_Idol.Delete();
            }

            if (m_RedSkulls != null)
            {
                for (int i = 0; i < m_RedSkulls.Count; ++i)
                {
                    m_RedSkulls[i].Delete();
                }

                m_RedSkulls.Clear();
            }

            if (m_WhiteSkulls != null)
            {
                for (int i = 0; i < m_WhiteSkulls.Count; ++i)
                {
                    m_WhiteSkulls[i].Delete();
                }

                m_WhiteSkulls.Clear();
            }

            if (m_Creatures != null)
            {
                for (int i = 0; i < m_Creatures.Count; ++i)
                {
                    Mobile mob = m_Creatures[i];

                    if (!mob.IsPlayer)
                    {
                        mob.Delete();
                    }
                }

                m_Creatures.Clear();
            }

            if (m_Champion != null && !m_Champion.IsPlayer)
            {
                m_Champion.Delete();
            }

            Stop();

            UpdateRegion();
        }