Exemplo n.º 1
0
 public void MergeFrom(ClientPlayerDetails other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CreationTime != 0L)
     {
         CreationTime = other.CreationTime;
     }
     if (other.Username.Length != 0)
     {
         Username = other.Username;
     }
     if (other.Team != 0)
     {
         Team = other.Team;
     }
     if (other.Tutorial.Length != 0)
     {
         Tutorial = other.Tutorial;
     }
     if (other.avatar_ != null)
     {
         if (avatar_ == null)
         {
             avatar_ = new global::PokemonGoApi.Proto.PlayerAvatar();
         }
         Avatar.MergeFrom(other.Avatar);
     }
     if (other.PokeStorage != 0)
     {
         PokeStorage = other.PokeStorage;
     }
     if (other.ItemStorage != 0)
     {
         ItemStorage = other.ItemStorage;
     }
     if (other.dailyBonus_ != null)
     {
         if (dailyBonus_ == null)
         {
             dailyBonus_ = new global::PokemonGoApi.Proto.DailyBonus();
         }
         DailyBonus.MergeFrom(other.DailyBonus);
     }
     if (other.Badge.Length != 0)
     {
         Badge = other.Badge;
     }
     if (other.settings_ != null)
     {
         if (settings_ == null)
         {
             settings_ = new global::PokemonGoApi.Proto.ContactSettingsProto();
         }
         Settings.MergeFrom(other.Settings);
     }
     currency_.Add(other.currency_);
 }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CreationTime != 0L)
            {
                hash ^= CreationTime.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (Tutorial.Length != 0)
            {
                hash ^= Tutorial.GetHashCode();
            }
            if (avatar_ != null)
            {
                hash ^= Avatar.GetHashCode();
            }
            if (PokeStorage != 0)
            {
                hash ^= PokeStorage.GetHashCode();
            }
            if (ItemStorage != 0)
            {
                hash ^= ItemStorage.GetHashCode();
            }
            if (dailyBonus_ != null)
            {
                hash ^= DailyBonus.GetHashCode();
            }
            if (Badge.Length != 0)
            {
                hash ^= Badge.GetHashCode();
            }
            if (settings_ != null)
            {
                hash ^= Settings.GetHashCode();
            }
            hash ^= currency_.GetHashCode();
            return(hash);
        }