コード例 #1
0
 public SaveBlockAccessor7b(SAV7b sav)
 {
     Zukan       = new Zukan7b(sav, GetBlockOffset(BelugaBlockIndex.Zukan), 0x550);
     Config      = new ConfigSave7b(sav, GetBlockOffset(BelugaBlockIndex.ConfigSave));
     Items       = new MyItem7b(sav, GetBlockOffset(BelugaBlockIndex.MyItem));
     Storage     = new PokeListHeader(sav, GetBlockOffset(BelugaBlockIndex.PokeListHeader));
     Status      = new MyStatus7b(sav, GetBlockOffset(BelugaBlockIndex.MyStatus));
     Played      = new PlayTime7b(sav, GetBlockOffset(BelugaBlockIndex.PlayTime));
     Misc        = new Misc7b(sav, GetBlockOffset(BelugaBlockIndex.Misc));
     EventWork   = new EventWork7b(sav, GetBlockOffset(BelugaBlockIndex.EventWork));
     GiftRecords = new WB7Records(sav, GetBlockOffset(BelugaBlockIndex.WB7Record));
 }
コード例 #2
0
ファイル: SAV7b.cs プロジェクト: Metryra/PKHeX
        public SAV7b(byte[] data)
        {
            Data       = data;
            BAK        = (byte[])Data.Clone();
            Exportable = !IsRangeEmpty(0, Data.Length);

            // Load Info
            const int len = 0xB8800; // 1mb always allocated

            BlockInfoOffset = len - 0x1F0;
            Blocks          = !Exportable ? BlockInfoGG : BlockInfo3DS.GetBlockInfoData(Data, ref BlockInfoOffset, SaveUtil.CRC16NoInvert, len);
            Personal        = PersonalTable.GG;

            Box         = GetBlockOffset(BelugaBlockIndex.PokeListPokemon);
            Party       = GetBlockOffset(BelugaBlockIndex.PokeListPokemon);
            EventFlag   = GetBlockOffset(BelugaBlockIndex.EventWork);
            PokeDex     = GetBlockOffset(BelugaBlockIndex.Zukan);
            Zukan       = new Zukan7b(this, PokeDex, 0x550);
            Config      = new ConfigSave7b(this);
            Items       = new MyItem7b(this);
            Storage     = new PokeListHeader(this);
            Status      = new MyStatus7b(this);
            Played      = new PlayTime7b(this);
            Misc        = new Misc7b(this);
            EventWork   = new EventWork7b(this);
            GiftRecords = new WB7Records(this);

            WondercardData = GiftRecords.Offset;

            HeldItems = Legal.HeldItems_GG;

            if (Exportable)
            {
                CanReadChecksums();
            }
            else
            {
                ClearBoxes();
            }
        }
コード例 #3
0
        private void Initialize()
        {
            Personal = PersonalTable.GG;

            Box         = GetBlockOffset(BelugaBlockIndex.PokeListPokemon);
            Party       = GetBlockOffset(BelugaBlockIndex.PokeListPokemon);
            EventFlag   = GetBlockOffset(BelugaBlockIndex.EventWork);
            PokeDex     = GetBlockOffset(BelugaBlockIndex.Zukan);
            Zukan       = new Zukan7b(this, PokeDex, 0x550);
            Config      = new ConfigSave7b(this);
            Items       = new MyItem7b(this);
            Storage     = new PokeListHeader(this);
            Status      = new MyStatus7b(this);
            Played      = new PlayTime7b(this);
            Misc        = new Misc7b(this);
            EventWork   = new EventWork7b(this);
            GiftRecords = new WB7Records(this);

            WondercardData = GiftRecords.Offset;

            HeldItems = Legal.HeldItems_GG;
        }