Example #1
0
        public BK4(byte[] decryptedData)
        {
            Data = decryptedData;
            uint sv = ((PID & 0x3E000) >> 0xD) % 24;

            Data = PKX.ShuffleArray(Data, sv, PKX.SIZE_4BLOCK);
            if (Sanity != 0 && Species <= MaxSpeciesID && !ChecksumValid) // We can only hope
            {
                RefreshChecksum();
            }
            if (Valid && Sanity == 0)
            {
                Sanity = 0x4000;
            }
            SetStats(GetStats(PersonalInfo));
        }
Example #2
0
File: BK4.cs Project: 04sama/PKHeX
        public BK4(byte[] data)
        {
            Data = data;
            uint sv = ((PID & 0x3E000) >> 0xD) % 24;

            Data = PKX.ShuffleArray(Data, sv, PKX.SIZE_4BLOCK);
            if (Sanity != 0 && Species <= MaxSpeciesID && !ChecksumValid) // We can only hope
            {
                RefreshChecksum();
            }
            if (Valid && Sanity == 0)
            {
                Sanity = 0x4000;
            }
            ResetPartyStats();
        }
Example #3
0
        public BK4(byte[] decryptedData = null, string ident = null)
        {
            Data = decryptedData ?? new byte[SIZE_PARTY];
            uint sv = ((PID & 0x3E000) >> 0xD) % 24;

            Data       = PKX.ShuffleArray(Data, sv, PKX.SIZE_4BLOCK);
            Identifier = ident;
            if (Sanity != 0 && Species <= MaxSpeciesID && !ChecksumValid) // We can only hope
            {
                RefreshChecksum();
            }
            if (Valid && Sanity == 0)
            {
                Sanity = 0x4000;
            }
            if (Data.Length != SIZE_PARTY)
            {
                Array.Resize(ref Data, SIZE_PARTY);
            }
        }