Exemplo n.º 1
0
        private List <JSONPlandoAbility> MigrateJSON(List <JSONPlandoAbility> list, string version)
        {
            if (version == FormMain.Version)
            {
                return(list);
            }
            List <JSONPlandoAbility> migrated = new List <JSONPlandoAbility>(list);

            if (VersionOrder.Compare(version, "1.8.0.Pre-3") == -1)
            {
                migrated.Where(j => j.Cost == 0).ForEach(j => j.Cost = -1);
            }

            return(migrated);
        }
Exemplo n.º 2
0
        private List <JSONPlandoEquip> MigrateJSON(List <JSONPlandoEquip> list, string version)
        {
            if (version == FormMain.Version)
            {
                return(list);
            }
            List <JSONPlandoEquip> migrated = new List <JSONPlandoEquip>(list);

            if (VersionOrder.Compare(version, "1.9.0.Pre-8") == -1)
            {
                migrated.Where(j => j.Rank == 0).ForEach(j => j.Rank = -1);
            }

            return(migrated);
        }
Exemplo n.º 3
0
        private List <JSONPlandoCrystarium> MigrateJSON(List <JSONPlandoCrystarium> list, string version)
        {
            if (version == FormMain.Version)
            {
                return(list);
            }
            List <JSONPlandoCrystarium> migrated = new List <JSONPlandoCrystarium>(list);

            if (VersionOrder.Compare(version, "1.8.0.Pre-3") == -1)
            {
                migrated.Where(j => j.Value == 0).ForEach(j => j.Value = -1);
                migrated.ForEach(j => j.CPCost = -1);
            }

            return(migrated);
        }
Exemplo n.º 4
0
        private List <JSONPlandoTreasure> MigrateJSON(List <JSONPlandoTreasure> list, string version)
        {
            if (version == FormMain.Version)
            {
                return(list);
            }
            List <JSONPlandoTreasure> migrated = new List <JSONPlandoTreasure>(list);

            if (VersionOrder.Compare(version, "1.9.0") == -1)
            {
                migrated.Where(j => j.Item == "Stilstone Ring").ForEach(j => j.Item = "Siltstone Ring");
            }
            if (VersionOrder.Compare(version, "1.8.0.Pre-3") == -1)
            {
                migrated.Where(j => j.Amount == 0).ForEach(j => j.Amount = -1);
            }

            return(migrated);
        }