public PokemonDataInfoEntry(CreatureIndex id, IReadOnlyBinaryDataAccessor data)
            {
                this.Id = id;

                Unknown00 = data.ReadInt64(0);
                Unknown08 = data.ReadInt64(8);

                var levelupLearnset = new List <LevelUpMove>(26);

                for (int i = 0; i < 26; i++)
                {
                    WazaIndex move  = (WazaIndex)data.ReadInt16(0x10 + i * sizeof(short));
                    byte      level = data.ReadByte(0x44 + i);
                    levelupLearnset.Add(new LevelUpMove(level, move));
                }
                this.LevelupLearnset = levelupLearnset;

                Unknown5E = data.ReadInt16(0x5E);
                Unknown60 = data.ReadInt32(0x60);

                PokedexNumber = data.ReadInt16(0x64);
                Unknown66     = data.ReadInt16(0x66);
                Taxon         = data.ReadInt16(0x68);

                Unknown6A = data.ReadInt16(0x6A);
                Unknown6C = data.ReadInt32(0x6C);
                Unknown70 = data.ReadInt32(0x70);

                BaseHitPoints      = data.ReadInt16(0x74);
                BaseAttack         = data.ReadInt16(0x76);
                BaseSpecialAttack  = data.ReadInt16(0x78);
                BaseDefense        = data.ReadInt16(0x7A);
                BaseSpecialDefense = data.ReadInt16(0x7C);
                BaseSpeed          = data.ReadInt16(0x7E);

                Unknown80 = data.ReadInt32(0x80);

                ExperienceEntry = data.ReadInt32(0x84);

                Unknown88 = data.ReadInt64(0x88);

                Ability1      = (AbilityIndex)data.ReadByte(0x90);
                Ability2      = (AbilityIndex)data.ReadByte(0x91);
                HiddenAbility = (AbilityIndex)data.ReadByte(0x92);
                Type1         = (PokemonType)data.ReadByte(0x93);
                Type2         = (PokemonType)data.ReadByte(0x94);

                Unknown95 = data.ReadByte(0x95);
                Unknown96 = data.ReadByte(0x96);
                Unknown97 = data.ReadByte(0x97);
                Unknown98 = data.ReadByte(0x98);
                Unknown99 = data.ReadByte(0x99);
                Unknown9A = data.ReadByte(0x9A);

                RecruitPrereq = data.ReadString(0x9B, 69, Encoding.ASCII).TrimEnd('\0');
            }
 public PokemonDataInfoEntry GetByPokemonId(CreatureIndex creatureIndex)
 {
     return(Entries[(int)creatureIndex]);
 }
Пример #3
0
 public IStarterModel?GetStarterById(CreatureIndex id)
 {
     return(Starters.FirstOrDefault(s => s.PokemonId == id));
 }
Пример #4
0
 /// <summary>
 /// Gets the 1-based index of the entry in <see cref="PokemonGraphicsDatabase"/> corresponding to the given Pokémon and form.
 /// </summary>
 public int GetGraphicsDatabaseIndex(CreatureIndex creatureIndex, PokemonFormType formType)
 {
     return(Entries[(int)creatureIndex - 1].PokemonGraphicsDatabaseEntryIds[(int)formType]);
 }
Пример #5
0
            public PokemonDataInfoEntry(CreatureIndex id, ReadOnlySpan <byte> data)
            {
                this.Id = id;

                // The unknown data
                byte[] Unk1toF = new byte[16];
                for (var count = 0; count <= 0xF; count++)
                {
                    Unk1toF[count] = data[count + 0];
                }
                this.Unk1toF = Unk1toF;

                var levelupLearnset = new List <LevelUpMove>(26);

                for (int i = 0; i < 26; i++)
                {
                    int  move  = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x10 + i * sizeof(short)));
                    byte level = data[0x44 + i];
                    levelupLearnset.Add(new LevelUpMove(level, (WazaIndex)move));
                }
                this.LevelupLearnset = levelupLearnset;

                Unk5E              = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x5E));
                Unk60              = BinaryPrimitives.ReadInt32LittleEndian(data.Slice(0x60));
                PokedexNumber      = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x64));
                Unk66              = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x66));
                Taxon              = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x68));
                ListNumber1        = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x6A));
                ListNumber2        = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x6));
                Unk6E              = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x6E));
                BaseHitPoints      = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x70));
                BaseAttack         = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x72));
                BaseDefense        = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x74));
                BaseSpecialAttack  = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x76));
                BaseSpecialDefense = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x78));
                BaseSpeed          = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x7A));
                EntryNumber        = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x7C));
                EvolvesFromEntry   = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x7E));
                ExperienceEntry    = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x80));

                // The unknown data
                byte[] Unk82 = new byte[11];
                for (var i = 0; i <= 0xA; i++)
                {
                    Unk82[i] = data[i + 0x82];
                }
                this.Unk82 = Unk82;

                Ability1      = (AbilityIndex)data[0x8C];
                Ability2      = (AbilityIndex)data[0x8D];
                HiddenAbility = (AbilityIndex)data[0x8E];
                Type1         = (PokemonType)data[0x8F];
                Type2         = (PokemonType)data[0x90];

                byte[] unk91 = new byte[3];
                unk91[0]   = data[0x91];
                unk91[1]   = data[0x92];
                unk91[2]   = data[0x93];
                this.Unk91 = unk91;

                IsMegaEvolution = data[0x94];
                MinEvolveLevel  = data[0x95];
                Unk96           = BinaryPrimitives.ReadInt16LittleEndian(data.Slice(0x96));
            }