Exemple #1
0
        public static void Remove()
        {
            string filename = XmlSpawner.LocateFile("RevampedSpawns/BlackthornDungeonCreature.xml");

            XmlSpawner.XmlLoadFromFile(filename, string.Empty, null, Point3D.Zero, Map.Internal, false, 0, false, out int processedmaps, out int processedspawners);

            RemoveDecoration();
        }
        public static void LoadFromXmlSpawner(string location, Map map, string prefix = null)
        {
            string filename = XmlSpawner.LocateFile(location);

            string SpawnerPrefix = prefix == null ? string.Empty : prefix;
            int    processedmaps;
            int    processedspawners;

            XmlSpawner.XmlLoadFromFile(filename, SpawnerPrefix, null, Point3D.Zero, map, false, 0, false, out processedmaps, out processedspawners);

            ToConsole(String.Format("Created {0} spawners from {1} with -{2}- prefix.", processedspawners, location, SpawnerPrefix == string.Empty ? "NO" : SpawnerPrefix));
        }
        // create an addon with the static components described in the multi.txt file
        public static XmlSpawnerAddon ReadMultiFile(string filename, out string status_str)
        {
            status_str = null;

            if (filename == null)
            {
                return(null);
            }

            XmlSpawnerAddon newaddon = null;

            // look for the file in the default spawner locations
            string dirname = XmlSpawner.LocateFile(filename);

            if (System.IO.File.Exists(dirname))
            {
                int ncomponents = 0;

                newaddon = new XmlSpawnerAddon();

                try
                {
                    ncomponents = LoadAddonFromMulti(newaddon, dirname, out status_str);
                }
                catch
                {
                    newaddon.Delete();
                    status_str = "Bad Multi file : " + filename;
                    return(null);
                }

                if (ncomponents == 0)
                {
                    newaddon.Delete();
                    status_str += " : " + filename;
                    return(null);
                }
            }
            else
            {
                status_str = "No such file : " + filename;
            }

            return(newaddon);
        }
Exemple #4
0
        public static void Generate()
        {
            string filename = XmlSpawner.LocateFile("RevampedSpawns/BlackthornDungeonCreature.xml");

            XmlSpawner.XmlUnLoadFromFile(filename, string.Empty, null, out int processedmaps, out int processedspawners);

            if (!Siege.SiegeShard)
            {
                if (BlackthornEntry.InstanceTram == null)
                {
                    BlackthornEntry.InstanceTram = new BlackthornEntry();
                    BlackthornEntry.InstanceTram.MoveToWorld(new Point3D(6409, 2677, 0), Map.Trammel);
                }

                if (BlackthornStep2.InstanceTram == null)
                {
                    BlackthornStep2.InstanceTram = new BlackthornStep2();
                    BlackthornStep2.InstanceTram.MoveToWorld(new Point3D(6378, 2612, 0), Map.Trammel);
                }

                if (BlackthornStep3.InstanceTram == null)
                {
                    BlackthornStep3.InstanceTram = new BlackthornStep3();
                    BlackthornStep3.InstanceTram.MoveToWorld(new Point3D(6454, 2741, 0), Map.Trammel);
                }

                if (BlackthornStep4.InstanceTram == null)
                {
                    BlackthornStep4.InstanceTram = new BlackthornStep4();
                    BlackthornStep4.InstanceTram.MoveToWorld(new Point3D(6363, 2739, 0), Map.Trammel);
                }

                if (BlackthornStep5.InstanceTram == null)
                {
                    BlackthornStep5.InstanceTram = new BlackthornStep5();
                    BlackthornStep5.InstanceTram.MoveToWorld(new Point3D(6327, 2647, 0), Map.Trammel);
                }

                if (BlackthornStep6.InstanceTram == null)
                {
                    BlackthornStep6.InstanceTram = new BlackthornStep6();
                    BlackthornStep6.InstanceTram.MoveToWorld(new Point3D(6297, 2677, -4), Map.Trammel);
                }

                if (BlackthornStep7.InstanceTram == null)
                {
                    BlackthornStep7.InstanceTram = new BlackthornStep7();
                    BlackthornStep7.InstanceTram.MoveToWorld(new Point3D(6429, 2709, 0), Map.Trammel);
                }

                if (BlackthornStep8.InstanceTram == null)
                {
                    BlackthornStep8.InstanceTram = new BlackthornStep8();
                    BlackthornStep8.InstanceTram.MoveToWorld(new Point3D(6408, 2792, 0), Map.Trammel);
                }

                GenerateMapDecoration(Map.Trammel);
            }

            if (BlackthornEntry.InstanceFel == null)
            {
                BlackthornEntry.InstanceFel = new BlackthornEntry();
                BlackthornEntry.InstanceFel.MoveToWorld(new Point3D(6409, 2677, 0), Map.Felucca);
            }

            if (BlackthornStep2.InstanceFel == null)
            {
                BlackthornStep2.InstanceFel = new BlackthornStep2();
                BlackthornStep2.InstanceFel.MoveToWorld(new Point3D(6378, 2612, 0), Map.Felucca);
            }

            if (BlackthornStep3.InstanceFel == null)
            {
                BlackthornStep3.InstanceFel = new BlackthornStep3();
                BlackthornStep3.InstanceFel.MoveToWorld(new Point3D(6454, 2741, 0), Map.Felucca);
            }

            if (BlackthornStep4.InstanceFel == null)
            {
                BlackthornStep4.InstanceFel = new BlackthornStep4();
                BlackthornStep4.InstanceFel.MoveToWorld(new Point3D(6363, 2739, 0), Map.Felucca);
            }

            if (BlackthornStep5.InstanceFel == null)
            {
                BlackthornStep5.InstanceFel = new BlackthornStep5();
                BlackthornStep5.InstanceFel.MoveToWorld(new Point3D(6327, 2647, 0), Map.Felucca);
            }

            if (BlackthornStep6.InstanceFel == null)
            {
                BlackthornStep6.InstanceFel = new BlackthornStep6();
                BlackthornStep6.InstanceFel.MoveToWorld(new Point3D(6297, 2677, -4), Map.Felucca);
            }

            if (BlackthornStep7.InstanceFel == null)
            {
                BlackthornStep7.InstanceFel = new BlackthornStep7();
                BlackthornStep7.InstanceFel.MoveToWorld(new Point3D(6429, 2709, 0), Map.Felucca);
            }

            if (BlackthornStep8.InstanceFel == null)
            {
                BlackthornStep8.InstanceFel = new BlackthornStep8();
                BlackthornStep8.InstanceFel.MoveToWorld(new Point3D(6408, 2792, 0), Map.Felucca);
            }

            GenerateMapDecoration(Map.Felucca);
        }