Пример #1
0
        public UpdatePokemonData Clone()
        {
            UpdatePokemonData data = base.MemberwiseClone() as UpdatePokemonData;

            data._addMoves    = new List <string>(this._addMoves);
            data._removeMoves = new List <string>(this._removeMoves);
            return(data);
        }
Пример #2
0
        public UpdatePokemonData AddUpdatePokemon(int identity, string name)
        {
            UpdatePokemonData item = new UpdatePokemonData();

            item.Identity = identity;
            item.NameBase = name;
            this._updatePokemons.Add(item);
            return(item);
        }
Пример #3
0
 public bool Equals(UpdatePokemonData data)
 {
     if (data == null)
     {
         return(false);
     }
     if (data._identity != this._identity)
     {
         return(false);
     }
     if (data._nameBase != this._nameBase)
     {
         return(false);
     }
     if (data._weight != this._weight)
     {
         return(false);
     }
     if (data._number != this._number)
     {
         return(false);
     }
     if (data._hpBase != this._hpBase)
     {
         return(false);
     }
     if (data._attackBase != this._attackBase)
     {
         return(false);
     }
     if (data._defenceBase != this._defenceBase)
     {
         return(false);
     }
     if (data._speedBase != this._speedBase)
     {
         return(false);
     }
     if (data._spAttackBase != this._spAttackBase)
     {
         return(false);
     }
     if (data._spDefenceBase != this._spDefenceBase)
     {
         return(false);
     }
     if (data._type1 != this._type1)
     {
         return(false);
     }
     if (data._type2 != this._type2)
     {
         return(false);
     }
     if (data._trait1 != this._trait1)
     {
         return(false);
     }
     if (data._trait2 != this._trait2)
     {
         return(false);
     }
     if (data._addMoves.Count != this._addMoves.Count)
     {
         return(false);
     }
     for (int i = 0; i < data._addMoves.Count; i++)
     {
         if (data._addMoves[i] != this._addMoves[i])
         {
             return(false);
         }
     }
     if (data._removeMoves.Count != this._removeMoves.Count)
     {
         return(false);
     }
     for (int j = 0; j < data._removeMoves.Count; j++)
     {
         if (data._removeMoves[j] != this._removeMoves[j])
         {
             return(false);
         }
     }
     return(true);
 }