Esempio n. 1
0
        public static void SetInstanceIcon(ContentFinderCondition sContentFinderCondition, dynamic obj)
        {
            if (sContentFinderCondition.Content.Key == 55001)
            {
                // Aquapolis
                obj.fullIcon = 1;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55002)
            {
                // Lost Canals of Uznair
                obj.fullIcon = 2;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55003)
            {
                // Hidden Canals of Uznair
                obj.fullIcon = 3;
                return;
            }

            if (sContentFinderCondition.Image.Path.EndsWith("000000.tex"))
            {
                DatabaseBuilder.PrintLine($"Content {sContentFinderCondition.Content.Key} {sContentFinderCondition.Content} has no icon");
                return;
            }

            obj.fullIcon = IconDatabase.EnsureEntry("instance", sContentFinderCondition.Image);
        }
Esempio n. 2
0
        public static void SetInstanceIcon(ContentFinderCondition sContentFinderCondition, dynamic obj)
        {
            if (sContentFinderCondition.Content.Key == 55001)
            {
                // Aquapolis
                obj.fullIcon = 1;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55002)
            {
                // Lost Canals of Uznair
                obj.fullIcon = 2;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55003)
            {
                // Hidden Canals of Uznair
                obj.fullIcon = 3;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55004)
            {
                // The Shifting Altars of Uznair
                obj.fullIcon = 4;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55006)
            {
                // The Dungeons of Lyhe Ghiah
                obj.fullIcon = 5;
                return;
            }

            if (sContentFinderCondition.Content.Key == 55008)
            {
                // The Shifting Oubliettes of Lyhe Ghiah
                obj.fullIcon = 6;
                return;
            }

            if (sContentFinderCondition.Image == null)
            {
                DatabaseBuilder.PrintLine($"Content {sContentFinderCondition.Content.Key} {sContentFinderCondition.Content} has no icon");
                return;
            }

            obj.fullIcon = IconDatabase.EnsureEntry("instance", sContentFinderCondition.Image);
        }
Esempio n. 3
0
        public void Build(bool fetchIconsOnly)
        {
            OneTimeExports.Run(_realm);

            // Miscellaneous initialization
            ItemsToImport = Sheet <Saint.Item>()
                            .Where(i => !Hacks.IsItemSkipped(i.Name, i.Key))
                            .ToArray();

            NpcsToImport = _realm.GameData.ENpcs
                           .Where(n => n.Resident != null)
                           .Where(n => !string.IsNullOrWhiteSpace(n.Singular))
                           .ToArray();

            _libraNpcIndex = _libra.Table <Libra.ENpcResident>().ToDictionary(e => e.Key);

            FileDatabase.Initialize();
            IconDatabase.Initialize();
            ItemIconDatabase.Initialize(ItemsToImport);
            PatchDatabase.Initialize();

            if (fetchIconsOnly)
            {
                new Lodestone.LodestoneIconScraper().FetchIcons();
                PrintLine("All icons fetched.  Stopping.");
                return;
            }

            var itemSourceComplexityModule = new ItemSourceComplexity();

            // All the modules.
            var modules = new Queue <Module>(new Module[]
            {
                new Indexes(),
                new Miscellaneous(),
                new Locations(),
                new Items(),
                //new ItemSets(),
                new Orchestrion(),
                new Actions(),
                new Emotes(),
                new Weather(),
                new Instances(),
                new Nodes(),
                new NPCs(),
                new SpecialShops(),
                new DisposalShops(),
                new Recipes(),
                new Specializations(),
                new Mounts(),
                new Minions(),
                new TripleTriad(),
                new Customize(),
                new Mobs(),
                new Quests(),
                new Talk(),
                new FishingSpots(),
                new Leves(),
                new Achievements(),
                new Fates(),
                new JobCategories(),
                new Ventures(),
                new Materia(),
                new WondrousTails(),
                new OtherItemSources(),
                new Relics(),
                itemSourceComplexityModule,
                new SupplyDuties(itemSourceComplexityModule),
                new Maps(),
                new EquipmentScorer(),
                new Jobs(),
                new Dyes(),
                new NpcEquipment(itemSourceComplexityModule),
                new NpcAlternates(), // Has to be the very end.
                new StatisticsModule(itemSourceComplexityModule),
            });

            itemSourceComplexityModule = null;

            var total = modules.Count;

            while (modules.Count > 0)
            {
                var module = modules.Dequeue();
                PrintLine($"* {module.Name}... {total - modules.Count}/{total}");
                module.Start();
            }
        }