Beispiel #1
0
        public DataViewModel(SaintCoinach.ARealmReversed realm)
        {
            this.Realm = realm;

            _FilteredSheets = Realm.GameData.AvailableSheets;
            _Bookmarks.CollectionChanged += _Bookmarks_CollectionChanged;
        }
 public DatabaseBuilder(SQLite.SQLiteConnection libra, SaintCoinach.ARealmReversed realm)
 {
     _db       = GarlandDatabase.Instance;
     _libra    = libra;
     _realm    = realm;
     Localize  = new Localize(realm);
     _instance = this;
 }
Beispiel #3
0
        public static void SetManualShops(SaintCoinach.ARealmReversed realm, Dictionary <int, GarlandShop> shopsByKey)
        {
            var sENpcs = realm.GameData.ENpcs;

            // Special Shops
            var syndony = sENpcs[1016289];

            shopsByKey[1769635].ENpcs = new ENpc[] { syndony };

            var eunakotor = new ENpc[] { sENpcs[1017338] };

            shopsByKey[1769675].ENpcs = eunakotor;
            shopsByKey[1769869].Fill("Request to keep your aetherpool gear", eunakotor);

            var disreputablePriest = new ENpc[] { sENpcs[1018655] };

            shopsByKey[1769743].Fill("Exchange Wolf Marks (Melee)", disreputablePriest);
            shopsByKey[1769744].Fill("Exchange Wolf Marks (Ranged)", disreputablePriest);

            var eurekaGerolt = new ENpc[] { sENpcs[1025047] };

            shopsByKey[1769820].Fill("Create or augment Eureka gear. (Paladin)", eurekaGerolt);
            shopsByKey[1769821].Fill("Create or augment Eureka gear. (Warrior)", eurekaGerolt);
            shopsByKey[1769822].Fill("Create or augment Eureka gear. (Dark Knight)", eurekaGerolt);
            shopsByKey[1769823].Fill("Create or augment Eureka gear. (Dragoon)", eurekaGerolt);
            shopsByKey[1769824].Fill("Create or augment Eureka gear. (Monk)", eurekaGerolt);
            shopsByKey[1769825].Fill("Create or augment Eureka gear. (Ninja)", eurekaGerolt);
            shopsByKey[1769826].Fill("Create or augment Eureka gear. (Samurai)", eurekaGerolt);
            shopsByKey[1769827].Fill("Create or augment Eureka gear. (Bard)", eurekaGerolt);
            shopsByKey[1769828].Fill("Create or augment Eureka gear. (Machinist)", eurekaGerolt);
            shopsByKey[1769829].Fill("Create or augment Eureka gear. (Black Mage)", eurekaGerolt);
            shopsByKey[1769830].Fill("Create or augment Eureka gear. (Summoner)", eurekaGerolt);
            shopsByKey[1769831].Fill("Create or augment Eureka gear. (Red Mage)", eurekaGerolt);
            shopsByKey[1769832].Fill("Create or augment Eureka gear. (White Mage)", eurekaGerolt);
            shopsByKey[1769833].Fill("Create or augment Eureka gear. (Scholar)", eurekaGerolt);
            shopsByKey[1769834].Fill("Create or augment Eureka gear. (Astrologian)", eurekaGerolt);

            var confederateCustodian = new ENpc[] { sENpcs[1025848] };

            shopsByKey[1769871].Fill("Exchange artifacts", confederateCustodian);
            shopsByKey[1769870].Fill("Request to keep your empyrean aetherpool gear", confederateCustodian);

            // Gil Shops
            var domanJunkmonger = new ENpc[] { sENpcs[1025763] };

            shopsByKey[262919].ENpcs = domanJunkmonger;

            // Gemstone Traders
            shopsByKey[1769957].ENpcs = new ENpc[] { sENpcs[1027998] }; // Gramsol, Crystarium
            shopsByKey[1769958].ENpcs = new ENpc[] { sENpcs[1027538] }; // Pedronille, Eulmore
            shopsByKey[1769959].ENpcs = new ENpc[] { sENpcs[1027385] }; // Siulmet, Lakeland
            shopsByKey[1769960].ENpcs = new ENpc[] { sENpcs[1027497] }; // ??, Kholusia
            shopsByKey[1769961].ENpcs = new ENpc[] { sENpcs[1027892] }; // Halden, Amh Araeng
            shopsByKey[1769962].ENpcs = new ENpc[] { sENpcs[1027665] }; // Sul Lad, Il Mheg
            shopsByKey[1769963].ENpcs = new ENpc[] { sENpcs[1027709] }; // Nacille, Rak'tika
            shopsByKey[1769964].ENpcs = new ENpc[] { sENpcs[1027766] }; // ??, Tempest
        }
Beispiel #4
0
        // Let us do some hacks here for hq icon...
        public static int EnsureEntryHQ(string type, ImageFile icon, int id, SaintCoinach.ARealmReversed realm)
        {
            if (icon == null || icon.Path.EndsWith("000000.tex"))
            {
                // If you've triggered this it's usually because a reference
                // to bad data crept in somewhere.  Check up the stack!
                // Protip: The first row of many sheets is filled with 0s and
                // can be safely skipped.
                throw new ArgumentException("bad icon", "icon");
            }

            // Check the type-id combo is already stored.
            var key = type + "-" + id;

            if (_iconsHQByKey.Contains(key))
            {
                return(id);
            }

            // Always add it to the list.
            _iconsHQByKey.Add(key);

            // Check the file exists already.
            var iconDirectory = Path.Combine(Config.IconPath, type);
            var fullPath      = Path.Combine(iconDirectory, id.ToString() + ".png");

            if (File.Exists(fullPath))
            {
                return(id);
            }

            // Write hq icons that don't yet exist.
            Directory.CreateDirectory(iconDirectory);

            System.Drawing.Image image = null;

            string iconPath = icon.Path;

            iconPath = iconPath.Replace(".tex", "_hr1.tex");
            realm.Packs.TryGetFile(iconPath, out var fileHQ);
            if (fileHQ != null)
            {
                var iconHQ = (ImageFile)fileHQ;
                image = iconHQ.GetImage();
            }
            else
            {
                image = icon.GetImage();
            }

            image.Save(fullPath, System.Drawing.Imaging.ImageFormat.Png);

            return(id);
        }
Beispiel #5
0
        public DataViewModel(SaintCoinach.ARealmReversed realm, MainViewModel parent)
        {
            this.Realm  = realm;
            this.Parent = parent;

            _FilteredSheets = Realm.GameData.AvailableSheets;

            _SelectedSheetName = Settings.Default.SelectedSheetName;
            _FilterDataTerm    = Settings.Default.FilterDataTerm;
            FilterSheetTerm    = Settings.Default.FilterSheetTerm;

            _Bookmarks.CollectionChanged += _Bookmarks_CollectionChanged;
        }
        private void StartCalibration(CalibrationConfig config)
        {
            var libraPath = System.IO.Path.Combine(Config.SupplementalPath, "app_data.sqlite");
            var realm     = new SaintCoinach.ARealmReversed(Config.GamePath, "SaintCoinach.History.zip", SaintCoinach.Ex.Language.English, libraPath);

            DatabaseBuilder.PrintLine($"Game version: {realm.GameVersion}");
            DatabaseBuilder.PrintLine($"Definition version: {realm.DefinitionVersion}");
            var processing = Stopwatch.StartNew();

            ItemIconCalibrator itemIconCalibrator = new ItemIconCalibrator(config, realm);

            itemIconCalibrator.Calibrate();

            processing.Stop();
            DatabaseBuilder.PrintLine($"Processing elapsed: {processing.Elapsed}");
        }
Beispiel #7
0
        public static void SetManualShops(SaintCoinach.ARealmReversed realm, Dictionary <int, GarlandShop> shopsByKey)
        {
            // Special Shops
            var syndony = realm.GameData.ENpcs[1016289];

            shopsByKey[1769635].ENpcs = new ENpc[] { syndony };

            var eunakotor = new ENpc[] { realm.GameData.ENpcs[1017338] };

            shopsByKey[1769675].ENpcs = eunakotor;
            shopsByKey[1769869].Fill("Request to keep your aetherpool gear", eunakotor);

            var disreputablePriest = new ENpc[] { realm.GameData.ENpcs[1018655] };

            shopsByKey[1769743].Fill("Exchange Wolf Marks (Melee)", disreputablePriest);
            shopsByKey[1769744].Fill("Exchange Wolf Marks (Ranged)", disreputablePriest);

            var eurekaGerolt = new ENpc[] { realm.GameData.ENpcs[1025047] };

            shopsByKey[1769820].Fill("Create or augment Eureka gear. (Paladin)", eurekaGerolt);
            shopsByKey[1769821].Fill("Create or augment Eureka gear. (Warrior)", eurekaGerolt);
            shopsByKey[1769822].Fill("Create or augment Eureka gear. (Dark Knight)", eurekaGerolt);
            shopsByKey[1769823].Fill("Create or augment Eureka gear. (Dragoon)", eurekaGerolt);
            shopsByKey[1769824].Fill("Create or augment Eureka gear. (Monk)", eurekaGerolt);
            shopsByKey[1769825].Fill("Create or augment Eureka gear. (Ninja)", eurekaGerolt);
            shopsByKey[1769826].Fill("Create or augment Eureka gear. (Samurai)", eurekaGerolt);
            shopsByKey[1769827].Fill("Create or augment Eureka gear. (Bard)", eurekaGerolt);
            shopsByKey[1769828].Fill("Create or augment Eureka gear. (Machinist)", eurekaGerolt);
            shopsByKey[1769829].Fill("Create or augment Eureka gear. (Black Mage)", eurekaGerolt);
            shopsByKey[1769830].Fill("Create or augment Eureka gear. (Summoner)", eurekaGerolt);
            shopsByKey[1769831].Fill("Create or augment Eureka gear. (Red Mage)", eurekaGerolt);
            shopsByKey[1769832].Fill("Create or augment Eureka gear. (White Mage)", eurekaGerolt);
            shopsByKey[1769833].Fill("Create or augment Eureka gear. (Scholar)", eurekaGerolt);
            shopsByKey[1769834].Fill("Create or augment Eureka gear. (Astrologian)", eurekaGerolt);

            var confederateCustodian = new ENpc[] { realm.GameData.ENpcs[1025848] };

            shopsByKey[1769871].Fill("Exchange artifacts", confederateCustodian);
            shopsByKey[1769870].Fill("Request to keep your empyrean aetherpool gear", confederateCustodian);

            // Gil Shops
            var domanJunkmonger = new ENpc[] { realm.GameData.ENpcs[1025763] };

            shopsByKey[262919].ENpcs = domanJunkmonger;
        }
Beispiel #8
0
        void BuildDatabase(bool fetchIconsOnly)
        {
            var libraPath = System.IO.Path.Combine(Config.SupplementalPath, "app_data.sqlite");
            var realm = new SaintCoinach.ARealmReversed(Config.GamePath, "SaintCoinach.History.zip", SaintCoinach.Ex.Language.English, libraPath);
            var libra = new SQLite.SQLiteConnection(libraPath, SQLite.SQLiteOpenFlags.ReadOnly);
            var builder = new DatabaseBuilder(libra, realm);

            DatabaseBuilder.PrintLine($"Game version: {realm.GameVersion}");
            DatabaseBuilder.PrintLine($"Definition version: {realm.DefinitionVersion}");

            var processing = Stopwatch.StartNew();
            builder.Build(fetchIconsOnly);

            if (!fetchIconsOnly)
                SpecialOutput.Run();

            processing.Stop();
            DatabaseBuilder.PrintLine($"Processing elapsed: {processing.Elapsed}");
        }
Beispiel #9
0
        void BuildDatabase(bool fetchIconsOnly)
        {
            var path    = _paths.FirstOrDefault(p => Directory.Exists(p));
            var realm   = new SaintCoinach.ARealmReversed(path, "SaintCoinach.History.zip", SaintCoinach.Ex.Language.English, "app_data.sqlite");
            var libra   = new SQLite.SQLiteConnection("app_data.sqlite", SQLite.SQLiteOpenFlags.ReadOnly);
            var builder = new DatabaseBuilder(libra, realm);

            DatabaseBuilder.PrintLine($"Game version: {realm.GameVersion}");
            DatabaseBuilder.PrintLine($"Definition version: {realm.DefinitionVersion}");

            OneTimeExports.Run(realm);

            var processing = Stopwatch.StartNew();

            builder.Build(fetchIconsOnly);

            if (!fetchIconsOnly)
            {
                SpecialOutput.Run();
            }

            processing.Stop();
            DatabaseBuilder.PrintLine($"Processing elapsed: {processing.Elapsed}");
        }
Beispiel #10
0
 public static int EnsureEntryHQ(string type, ImageFile icon, SaintCoinach.ARealmReversed realm)
 {
     return(EnsureEntryHQ(type, icon, Utils.GetIconId(icon), realm));
 }
 public ItemIconCalibrator(CalibrationConfig config, SaintCoinach.ARealmReversed realm)
 {
     _config = config;
     _realm  = realm;
 }
Beispiel #12
0
 public SightSeeComand(SaintCoinach.ARealmReversed realm) : base("Sight", "Sight see generation")
 {
     _Realm = realm;
 }
Beispiel #13
0
        static void Main(string[] args)
        {
            var realm = new SaintCoinach.ARealmReversed(GameDirectory, SaintCoinach.Ex.Language.English);
            //if (!realm.IsCurrentVersion)
            //{
            //    const bool IncludeDataChanges = true;
            //    var updateReport = realm.Update(IncludeDataChanges);
            //}

            var entries        = new List <ActionEntry>();
            var actionElements = new List <SaintCoinach.Text.INode>();

            var actSheet = realm.GameData.GetSheet <SaintCoinach.Xiv.Action>();

            foreach (var act in actSheet)
            {
                if (act.Name == null || act.Name.IsEmpty)
                {
                    continue;
                }

                if (act.ClassJob == null || act.ClassJob.Name == null || act.ClassJob.Name.IsEmpty)
                {
                    continue;
                }

                if (act.AsBoolean("IsPvP"))
                {
                    continue;
                }

                // could do Key == 32 or 33 but this is clearer
                if (act.ClassJob.ClassJobCategory.Name == "Disciple of the Land" || act.ClassJob.ClassJobCategory.Name == "Disciple of the Hand")
                {
                    continue;
                }

                if (act.ActionCategory.Name != "Ability" &&
                    act.ActionCategory.Name != "Auto-attack" &&
                    act.ActionCategory.Name != "Spell" &&
                    act.ActionCategory.Name != "Weaponskill" &&
                    act.ActionCategory.Name != "Limit Break")
                {
                    continue;
                }

                Console.WriteLine($"{act.Key} - {act.Name}");

                var entry = new ActionEntry
                {
                    Id   = act.Key,
                    Name = act.Name
                };

                actionElements.Clear();
                foreach (var node in act.ActionTransient.Description.Children)
                {
                    FilterNode(node, actionElements);
                }
                PopulateEntry(entry, actionElements);

                // Console.WriteLine(entry);

                // this doesn't match the c++ behavior, but it was mentioned that empty skills are pointless...
                if (!entry.IsEmpty)
                {
                    entries.Add(entry);
                }
            }

            Console.WriteLine($"Found {entries.Count()} player actions");

            OutputCpp(entries, OutputFileName);

            Console.ReadLine();
        }
Beispiel #14
0
 public TestCommand(SaintCoinach.ARealmReversed realm) : base("test", "Just testing")
 {
     _Realm = realm;
 }
 public DataViewModel(SaintCoinach.ARealmReversed realm)
 {
     this.Realm = realm;
 }
Beispiel #16
0
        public static void SetManualShops(SaintCoinach.ARealmReversed realm, Dictionary <int, GarlandShop> shopsByKey)
        {
            var sENpcs = realm.GameData.ENpcs;

            // Special Shops
            var syndony = sENpcs[1016289];

            shopsByKey[1769635].ENpcs = new ENpc[] { syndony };

            var eunakotor = new ENpc[] { sENpcs[1017338] };

            shopsByKey[1769675].ENpcs = eunakotor;
            shopsByKey[1769869].Fill("Request to keep your aetherpool gear", eunakotor);

            var disreputablePriest = new ENpc[] { sENpcs[1018655] };

            shopsByKey[1769743].Fill("Exchange Wolf Marks (Melee)", disreputablePriest);
            shopsByKey[1769744].Fill("Exchange Wolf Marks (Ranged)", disreputablePriest);

            var eurekaGerolt = new ENpc[] { sENpcs[1025047] };

            shopsByKey[1769820].Fill("Create or augment Eureka gear. (Paladin)", eurekaGerolt);
            shopsByKey[1769821].Fill("Create or augment Eureka gear. (Warrior)", eurekaGerolt);
            shopsByKey[1769822].Fill("Create or augment Eureka gear. (Dark Knight)", eurekaGerolt);
            shopsByKey[1769823].Fill("Create or augment Eureka gear. (Dragoon)", eurekaGerolt);
            shopsByKey[1769824].Fill("Create or augment Eureka gear. (Monk)", eurekaGerolt);
            shopsByKey[1769825].Fill("Create or augment Eureka gear. (Ninja)", eurekaGerolt);
            shopsByKey[1769826].Fill("Create or augment Eureka gear. (Samurai)", eurekaGerolt);
            shopsByKey[1769827].Fill("Create or augment Eureka gear. (Bard)", eurekaGerolt);
            shopsByKey[1769828].Fill("Create or augment Eureka gear. (Machinist)", eurekaGerolt);
            shopsByKey[1769829].Fill("Create or augment Eureka gear. (Black Mage)", eurekaGerolt);
            shopsByKey[1769830].Fill("Create or augment Eureka gear. (Summoner)", eurekaGerolt);
            shopsByKey[1769831].Fill("Create or augment Eureka gear. (Red Mage)", eurekaGerolt);
            shopsByKey[1769832].Fill("Create or augment Eureka gear. (White Mage)", eurekaGerolt);
            shopsByKey[1769833].Fill("Create or augment Eureka gear. (Scholar)", eurekaGerolt);
            shopsByKey[1769834].Fill("Create or augment Eureka gear. (Astrologian)", eurekaGerolt);

            var confederateCustodian = new ENpc[] { sENpcs[1025848] };

            shopsByKey[1769871].Fill("Exchange artifacts", confederateCustodian);
            shopsByKey[1769870].Fill("Request to keep your empyrean aetherpool gear", confederateCustodian);

            // Gil Shops
            var domanJunkmonger = new ENpc[] { sENpcs[1025763] };

            shopsByKey[262919].ENpcs = domanJunkmonger;

            // Gemstone Traders
            shopsByKey[1769957].ENpcs = new ENpc[] { sENpcs[1027998] }; // Gramsol, Crystarium
            shopsByKey[1769958].ENpcs = new ENpc[] { sENpcs[1027538] }; // Pedronille, Eulmore
            shopsByKey[1769959].ENpcs = new ENpc[] { sENpcs[1027385] }; // Siulmet, Lakeland
            shopsByKey[1769960].ENpcs = new ENpc[] { sENpcs[1027497] }; // ??, Kholusia
            shopsByKey[1769961].ENpcs = new ENpc[] { sENpcs[1027892] }; // Halden, Amh Araeng
            shopsByKey[1769962].ENpcs = new ENpc[] { sENpcs[1027665] }; // Sul Lad, Il Mheg
            shopsByKey[1769963].ENpcs = new ENpc[] { sENpcs[1027709] }; // Nacille, Rak'tika
            shopsByKey[1769964].ENpcs = new ENpc[] { sENpcs[1027766] }; // ??, Tempest

            // Faux Leaves
            var fauxCommander = new ENpc[] { sENpcs[1033921] };

            shopsByKey[1770282].Fill("Exchange Faux Leaves", fauxCommander);

            // Faire Voucher
            shopsByKey[1770286].Name = "Exchange Faire Voucher";

            // TODO: Fill the shop name via territory sheet
            // e.g. Bozja are at custom/006/CtsMycExorcismTrade_00679

            // Bozja Shops
            var resistanceSuppliers = new ENpc[] { sENpcs[1034007], // Southern Front Cluster exchange
                                                   sENpcs[1036895]  // Zadnor Cluster exchange
            };

            shopsByKey[1770087].Fill("Exchange Bozjan clusters for items.", resistanceSuppliers);
        }