public void Load(byte[] data, int start)
        {
            if (start + 0xf0 > data.Length)
            {
                throw new ArgumentOutOfRangeException("start");
            }

            Party = new BattleSubwayPokemon5[3];
            for (int x = 0; x < 3; x++)
            {
                Party[x] = new BattleSubwayPokemon5(data, start + x * 0x3c);
            }
            Profile = new BattleSubwayProfile5(data, 0xb4 + start);

            byte[] trendyPhrase = new byte[8];
            Array.Copy(data, 0xd6 + start, trendyPhrase, 0, 8);
            PhraseChallenged = new TrendyPhrase5(trendyPhrase);
            trendyPhrase     = new byte[8];
            Array.Copy(data, 0xde + start, trendyPhrase, 0, 8);
            PhraseWon    = new TrendyPhrase5(trendyPhrase);
            trendyPhrase = new byte[8];
            Array.Copy(data, 0xe6 + start, trendyPhrase, 0, 8);
            PhraseLost = new TrendyPhrase5(trendyPhrase);

            Unknown3 = BitConverter.ToUInt16(data, 0xee + start);
        }
Esempio n. 2
0
        public BattleSubwayPokemon5 Clone()
        {
            uint ivsField = (uint)(IVs.ToInt32() & 0x3fffffffu) | (IvFlags & 0xc0000000u);

            ushort[] moveset = GetArrayFromMoves(Moves);
            byte     ppUps   = GetPpUpsFromMoves(Moves);

            BattleSubwayPokemon5 result = new BattleSubwayPokemon5(m_pokedex,
                                                                   (ushort)SpeciesID, (ushort)HeldItemID, moveset,
                                                                   TrainerID, Personality, ivsField, EVs.ToArray(), ppUps,
                                                                   Language, (byte)AbilityID, Happiness, NicknameEncoded, Unknown2);

            return(result);
        }
        public BattleSubwayPokemon5 Clone()
        {
            BattleSubwayPokemon5 result = new BattleSubwayPokemon5();
            result.Species = Species;
            result.HeldItem = HeldItem;
            result.Moveset = Moveset.ToArray();
            result.OT = OT;
            result.Personality = Personality;
            result.IVs = IVs;
            result.EVs = EVs.ToArray();
            result.Unknown1 = Unknown1;
            result.Language = Language;
            result.Ability = Ability;
            result.Happiness = Happiness;
            result.Nickname = new EncodedString5(Nickname.RawData.ToArray());
            result.Unknown2 = Unknown2;

            return result;
        }
        public BattleSubwayPokemon5 Clone()
        {
            BattleSubwayPokemon5 result = new BattleSubwayPokemon5();

            result.Species     = Species;
            result.HeldItem    = HeldItem;
            result.Moveset     = Moveset.ToArray();
            result.OT          = OT;
            result.Personality = Personality;
            result.IVs         = IVs;
            result.EVs         = EVs.ToArray();
            result.Unknown1    = Unknown1;
            result.Language    = Language;
            result.Ability     = Ability;
            result.Happiness   = Happiness;
            result.Nickname    = new EncodedString5(Nickname.RawData.ToArray());
            result.Unknown2    = Unknown2;

            return(result);
        }
        public void Load(byte[] data, int start)
        {
            if (start + 0xf0 > data.Length) throw new ArgumentOutOfRangeException("start");

            Party = new BattleSubwayPokemon5[3];
            for (int x = 0; x < 3; x++)
            {
                Party[x] = new BattleSubwayPokemon5(data, start + x * 0x3c);
            }
            Profile = new BattleSubwayProfile5(data, 0xb4 + start);

            byte[] trendyPhrase = new byte[8];
            Array.Copy(data, 0xd6 + start, trendyPhrase, 0, 8);
            PhraseChallenged = new TrendyPhrase5(trendyPhrase);
            trendyPhrase = new byte[8];
            Array.Copy(data, 0xde + start, trendyPhrase, 0, 8);
            PhraseWon = new TrendyPhrase5(trendyPhrase);
            trendyPhrase = new byte[8];
            Array.Copy(data, 0xe6 + start, trendyPhrase, 0, 8);
            PhraseLost = new TrendyPhrase5(trendyPhrase);

            Unknown3 = BitConverter.ToUInt16(data, 0xee + start);
        }