Esempio n. 1
0
        public static MoveLearnData FromStream(Stream input)
        {
            MoveLearnData data   = new MoveLearnData();
            BinaryReader  reader = new BinaryReader(input);

            data._withoutTrait = (Trait)reader.ReadInt32();
            data._moveName     = reader.ReadString();
            data._learnBy      = reader.ReadString();
            data._info         = reader.ReadString();
            return(data);
        }
Esempio n. 2
0
        public static PokemonBattle.PokemonData.PokemonData FromStream(Stream input)
        {
            PokemonBattle.PokemonData.PokemonData data = new PokemonBattle.PokemonData.PokemonData();
            BinaryReader reader = new BinaryReader(input);

            data._trait1            = (Trait)reader.ReadInt32();
            data._trait2            = (Trait)reader.ReadInt32();
            data._eggGroup1         = (EggGroup)reader.ReadInt32();
            data._eggGroup2         = (EggGroup)reader.ReadInt32();
            data._genderRestriction = (PokemonGenderRestriction)reader.ReadInt32();
            data._identity          = reader.ReadInt32();
            data._nameBase          = reader.ReadString();
            data._number            = reader.ReadInt32();
            data._weight            = reader.ReadDouble();
            data._hpBase            = reader.ReadByte();
            data._attackBase        = reader.ReadByte();
            data._defenceBase       = reader.ReadByte();
            data._speedBase         = reader.ReadByte();
            data._spAttackBase      = reader.ReadByte();
            data._spDefenceBase     = reader.ReadByte();
            data._type1             = reader.ReadString();
            data._type2             = reader.ReadString();
            data._beforeEvolution   = reader.ReadInt32();
            data._frontImage        = reader.ReadInt64();
            data._frontImageF       = reader.ReadInt64();
            data._backImage         = reader.ReadInt64();
            data._backImageF        = reader.ReadInt64();
            data._icon   = reader.ReadInt64();
            data._frame  = reader.ReadInt64();
            data._frameF = reader.ReadInt64();
            int num = reader.ReadInt32();

            for (int i = 0; i < num; i++)
            {
                data._afterEvolution.Add(reader.ReadInt32());
            }
            num = reader.ReadInt32();
            for (int j = 0; j < num; j++)
            {
                data._moves.Add(MoveLearnData.FromStream(input));
            }
            data._itemRestriction = (Item)reader.ReadInt32();
            return(data);
        }