コード例 #1
0
        public static PokemonCustomInfo FormStream(Stream input)
        {
            PokemonCustomInfo info   = new PokemonCustomInfo();
            BinaryReader      reader = new BinaryReader(input);

            info.Identity = reader.ReadInt32();
            if (info.Identity != 0)
            {
                info.Nickname      = reader.ReadString();
                info.LV            = reader.ReadByte();
                info.AttackEV      = reader.ReadByte();
                info.DefenceEV     = reader.ReadByte();
                info.SpeedEV       = reader.ReadByte();
                info.SpAttackEV    = reader.ReadByte();
                info.SpDefenceEV   = reader.ReadByte();
                info.HPEV          = reader.ReadByte();
                info.AttackIV      = reader.ReadByte();
                info.DefenceIV     = reader.ReadByte();
                info.SpeedIV       = reader.ReadByte();
                info.SpAttackIV    = reader.ReadByte();
                info.SpDefenceIV   = reader.ReadByte();
                info.HPIV          = reader.ReadByte();
                info.Gender        = (PokemonGender)reader.ReadInt32();
                info.SelectedTrait = reader.ReadByte();
                info.Character     = (PokemonCharacter)reader.ReadInt32();
                info.Item          = (PokemonBattle.PokemonData.Item)reader.ReadInt32();
                for (int i = 0; i < 4; i++)
                {
                    info.SelectedMoves[i] = reader.ReadString();
                }
            }
            return(info);
        }
コード例 #2
0
 public static bool CheckPokemon(PokemonCustomInfo pokemon)
 {
     if (_dataProvider == null)
     {
         return(false);
     }
     return(_dataProvider.CheckPokemon(pokemon));
 }
コード例 #3
0
        public PokemonCustomInfo Clone()
        {
            PokemonCustomInfo info = base.MemberwiseClone() as PokemonCustomInfo;

            info._selectedMoves = new string[4];
            for (int i = 0; i < 4; i++)
            {
                info._selectedMoves[i] = this._selectedMoves[i];
            }
            return(info);
        }
コード例 #4
0
        public static TeamData FormStream(Stream input)
        {
            TeamData     data   = new TeamData();
            BinaryReader reader = new BinaryReader(input);

            data._customInfo.DataName = reader.ReadString();
            data._customInfo.DataHash = reader.ReadString();
            for (int i = 0; i < data._pokemons.Length; i++)
            {
                data._pokemons[i] = PokemonCustomInfo.FormStream(input);
            }
            return(data);
        }
コード例 #5
0
 public bool Equals(PokemonCustomInfo info)
 {
     if (info._identity != this._identity)
     {
         return(false);
     }
     if (info._nickname != this._nickname)
     {
         return(false);
     }
     if (info._LV != this._LV)
     {
         return(false);
     }
     if (info._hpEV != this._hpEV)
     {
         return(false);
     }
     if (info._attackEV != this._attackEV)
     {
         return(false);
     }
     if (info._defenceEV != this._defenceEV)
     {
         return(false);
     }
     if (info._speedEV != this._speedEV)
     {
         return(false);
     }
     if (info._spAttackEV != this._spAttackEV)
     {
         return(false);
     }
     if (info._spDefenceEV != this._spDefenceEV)
     {
         return(false);
     }
     if (info._hpIV != this._hpIV)
     {
         return(false);
     }
     if (info._attackIV != this._attackIV)
     {
         return(false);
     }
     if (info._defenceIV != this._defenceIV)
     {
         return(false);
     }
     if (info._speedIV != this._speedIV)
     {
         return(false);
     }
     if (info._spAttackIV != this._spAttackIV)
     {
         return(false);
     }
     if (info._spDefenceIV != this._spDefenceIV)
     {
         return(false);
     }
     if (info._gender != this._gender)
     {
         return(false);
     }
     if (info._character != this._character)
     {
         return(false);
     }
     if (info._selectedTrait != this._selectedTrait)
     {
         return(false);
     }
     if (info._item != this._item)
     {
         return(false);
     }
     for (int i = 0; i < 4; i++)
     {
         if (this._selectedMoves[i] != info._selectedMoves[i])
         {
             return(false);
         }
     }
     return(true);
 }