Example #1
0
        public void OnSlice()
        {
            if (!m_Active || Deleted)
            {
                return;
            }

            bool changed = false;
            bool done    = true;

            for (var index = 0; index < Spawn.Count; index++)
            {
                MiniChampSpawnInfo spawn = Spawn[index];

                if (spawn.Slice() && !changed)
                {
                    changed = true;
                }

                if (!spawn.Done && done)
                {
                    done = false;
                }
            }

            if (done)
            {
                AdvanceLevel();
            }

            if (m_Active)
            {
                for (var index = 0; index < Spawn.Count; index++)
                {
                    MiniChampSpawnInfo spawn = Spawn[index];

                    if (spawn.Respawn() && !changed)
                    {
                        changed = true;
                    }
                }
            }

            if (done || changed)
            {
                InvalidateProperties();
            }
        }
Example #2
0
        public void ClearSpawn()
        {
            for (var index = 0; index < Spawn.Count; index++)
            {
                MiniChampSpawnInfo spawn = Spawn[index];

                for (var i = 0; i < spawn.Creatures.Count; i++)
                {
                    Mobile creature = spawn.Creatures[i];

                    Despawns.Add(creature);
                }
            }

            Spawn.Clear();
        }