Beispiel #1
0
 public void MergeFrom(TradingPokemon other)
 {
     if (other == null)
     {
         return;
     }
     if (other.PokemonId != 0UL)
     {
         PokemonId = other.PokemonId;
     }
     if (other.PokedexEntryNumber != 0)
     {
         PokedexEntryNumber = other.PokedexEntryNumber;
     }
     if (other.OriginalCp != 0)
     {
         OriginalCp = other.OriginalCp;
     }
     if (other.AdjustedCpMin != 0)
     {
         AdjustedCpMin = other.AdjustedCpMin;
     }
     if (other.AdjustedCpMax != 0)
     {
         AdjustedCpMax = other.AdjustedCpMax;
     }
     if (other.OriginalStamina != 0)
     {
         OriginalStamina = other.OriginalStamina;
     }
     if (other.AdjustedStaminaMin != 0)
     {
         AdjustedStaminaMin = other.AdjustedStaminaMin;
     }
     if (other.AdjustedStaminaMax != 0)
     {
         AdjustedStaminaMax = other.AdjustedStaminaMax;
     }
     if (other.FriendLevelCap != false)
     {
         FriendLevelCap = other.FriendLevelCap;
     }
     if (other.Move1 != 0)
     {
         Move1 = other.Move1;
     }
     if (other.Move2 != 0)
     {
         Move2 = other.Move2;
     }
     if (other.pokemonDisplay_ != null)
     {
         if (pokemonDisplay_ == null)
         {
             pokemonDisplay_ = new global::POGOProtos.Data.PokemonDisplay();
         }
         PokemonDisplay.MergeFrom(other.PokemonDisplay);
     }
     if (other.CapturedS2CellId != 0L)
     {
         CapturedS2CellId = other.CapturedS2CellId;
     }
     if (other.tradedPokemon_ != null)
     {
         if (tradedPokemon_ == null)
         {
             tradedPokemon_ = new global::POGOProtos.Data.PokemonData();
         }
         TradedPokemon.MergeFrom(other.TradedPokemon);
     }
     if (other.pokeball_ != null)
     {
         if (pokeball_ == null)
         {
             pokeball_ = new global::POGOProtos.Inventory.Item.ItemData();
         }
         Pokeball.MergeFrom(other.Pokeball);
     }
     if (other.IndividualAttack != 0)
     {
         IndividualAttack = other.IndividualAttack;
     }
     if (other.IndividualDefense != 0)
     {
         IndividualDefense = other.IndividualDefense;
     }
     if (other.IndividualStamina != 0)
     {
         IndividualStamina = other.IndividualStamina;
     }
     if (other.Nickname.Length != 0)
     {
         Nickname = other.Nickname;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PokemonId != 0UL)
            {
                hash ^= PokemonId.GetHashCode();
            }
            if (PokedexEntryNumber != 0)
            {
                hash ^= PokedexEntryNumber.GetHashCode();
            }
            if (OriginalCp != 0)
            {
                hash ^= OriginalCp.GetHashCode();
            }
            if (AdjustedCpMin != 0)
            {
                hash ^= AdjustedCpMin.GetHashCode();
            }
            if (AdjustedCpMax != 0)
            {
                hash ^= AdjustedCpMax.GetHashCode();
            }
            if (OriginalStamina != 0)
            {
                hash ^= OriginalStamina.GetHashCode();
            }
            if (AdjustedStaminaMin != 0)
            {
                hash ^= AdjustedStaminaMin.GetHashCode();
            }
            if (AdjustedStaminaMax != 0)
            {
                hash ^= AdjustedStaminaMax.GetHashCode();
            }
            if (FriendLevelCap != false)
            {
                hash ^= FriendLevelCap.GetHashCode();
            }
            if (Move1 != 0)
            {
                hash ^= Move1.GetHashCode();
            }
            if (Move2 != 0)
            {
                hash ^= Move2.GetHashCode();
            }
            if (pokemonDisplay_ != null)
            {
                hash ^= PokemonDisplay.GetHashCode();
            }
            if (CapturedS2CellId != 0L)
            {
                hash ^= CapturedS2CellId.GetHashCode();
            }
            if (tradedPokemon_ != null)
            {
                hash ^= TradedPokemon.GetHashCode();
            }
            if (pokeball_ != null)
            {
                hash ^= Pokeball.GetHashCode();
            }
            if (IndividualAttack != 0)
            {
                hash ^= IndividualAttack.GetHashCode();
            }
            if (IndividualDefense != 0)
            {
                hash ^= IndividualDefense.GetHashCode();
            }
            if (IndividualStamina != 0)
            {
                hash ^= IndividualStamina.GetHashCode();
            }
            if (Nickname.Length != 0)
            {
                hash ^= Nickname.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }