Exemple #1
0
        public void TransformAndRestore()
        {
            if (m_Duplicates.Count == 0)
            {
                return;
            }

            List <Point3D> m_Locations = new List <Point3D>();

            for (int a = 0; a < m_Duplicates.Count; a++)
            {
                MysterySphinx mysterySphinx = m_Duplicates[a];

                mysterySphinx.Restore();
                m_Locations.Add(mysterySphinx.Location);
            }

            int locationCount = m_Locations.Count;

            if (m_Locations.Count > 0)
            {
                for (int a = 0; a < m_Duplicates.Count; a++)
                {
                    int index = Utility.RandomMinMax(0, m_Locations.Count - 1);

                    m_Duplicates[a].Location = m_Locations[index];
                    m_Locations.RemoveAt(index);
                }
            }

            for (int a = 0; a < m_Duplicates.Count; a++)
            {
                CustomizationAbilities.Vanish(m_Duplicates[a]);

                m_Duplicates[a].m_MasterSphinx = false;
                m_Duplicates[a].Say("Sorry, try again.");
                m_Duplicates[a].m_NextSpeechAllowed = DateTime.UtcNow + NextSpeechDelay;
            }

            MysterySphinx newMasterSphinx = m_Duplicates[Utility.RandomMinMax(0, m_Duplicates.Count - 1)];

            newMasterSphinx.m_MasterSphinx = true;
        }