Exemple #1
0
        public override void ClearItems()
        {
            ClearSpawn();

            if (Trees != null)
            {
                List <ShadowguardCypress> list = new List <ShadowguardCypress>(Trees.Where(t => t != null && !t.Deleted));

                foreach (var tree in list)
                {
                    tree.Delete();
                }

                ColUtility.Free(list);

                ColUtility.Free(Trees);
                Trees = null;
            }

            if (Bones != null)
            {
                Bones.Delete();
                Bones = null;
            }
        }
Exemple #2
0
        public override void ClearItems()
        {
            if (Spawn != null)
            {
                List <BaseCreature> list = new List <BaseCreature>(Spawn.Where(e => e != null && e.Alive));

                foreach (var spawn in list)
                {
                    spawn.Delete();
                }

                ColUtility.Free(list);

                ColUtility.Free(Spawn);
                Spawn = null;
            }

            if (Trees != null)
            {
                List <ShadowguardCypress> list = new List <ShadowguardCypress>(Trees.Where(t => t != null && !t.Deleted));

                foreach (var tree in list)
                {
                    tree.Delete();
                }

                ColUtility.Free(list);

                ColUtility.Free(Trees);
                Trees = null;
            }

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