Exemplo n.º 1
0
        internal async Task SavePokemonInfo(PokemonInfoTable table, ReferencedGarc garcPokeInfo)
        {
            Assertions.AssertVersion(this.Version, table.GameVersion);

            var files = await garcPokeInfo.GetFiles();

            files[garcPokeInfo.Garc.FileCount - 1] = table.Write();

            await garcPokeInfo.SetFiles(files);
        }
Exemplo n.º 2
0
        internal async Task SaveLearnsets(IEnumerable <Learnset> learnsets, ReferencedGarc garcLearnsets)
        {
            var list = learnsets.ToList();

            foreach (var l in list)
            {
                Assertions.AssertVersion(this.Version, l.GameVersion);
            }

            var files = list.Select(l => l.Write()).ToArray();

            await garcLearnsets.SetFiles(files);
        }
Exemplo n.º 3
0
        internal async Task SaveItems(IEnumerable <Item> items, ReferencedGarc garcItems)
        {
            var list = items.ToList();

            foreach (var i in list)
            {
                Assertions.AssertVersion(this.Version, i.GameVersion);
            }

            var files = list.Select(l => l.Write()).ToArray();

            await garcItems.SetFiles(files);
        }
Exemplo n.º 4
0
        internal async Task SaveMoves(IEnumerable <Move> moves, ReferencedGarc garcMoves)
        {
            var list = moves.ToList();

            foreach (var move in list)
            {
                Assertions.AssertVersion(this.Version, move.GameVersion);
            }

            if (this.Version.IsORAS() || this.Version.IsGen7())
            {
                var file = Mini.PackMini(list.Select(m => m.Write()).ToArray(), "WD");
                await garcMoves.SetFile(0, file);
            }
            else
            {
                await garcMoves.SetFiles(list.Select( m => m.Write()).ToArray());
            }
        }
Exemplo n.º 5
0
        internal void SaveTmsHms(TmsHms tmsHms, CodeBin codeBin)
        {
            Assertions.AssertVersion(this.Version, tmsHms.GameVersion);

            codeBin.WriteStructure(tmsHms);
        }