Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CreationTimestampMs != 0L)
            {
                hash ^= CreationTimestampMs.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            hash ^= tutorialState_.GetHashCode();
            if (avatar_ != null)
            {
                hash ^= Avatar.GetHashCode();
            }
            if (MaxPokemonStorage != 0)
            {
                hash ^= MaxPokemonStorage.GetHashCode();
            }
            if (MaxItemStorage != 0)
            {
                hash ^= MaxItemStorage.GetHashCode();
            }
            if (dailyBonus_ != null)
            {
                hash ^= DailyBonus.GetHashCode();
            }
            if (equippedBadge_ != null)
            {
                hash ^= EquippedBadge.GetHashCode();
            }
            if (contactSettings_ != null)
            {
                hash ^= ContactSettings.GetHashCode();
            }
            hash ^= currencies_.GetHashCode();
            if (RemainingCodenameClaims != 0)
            {
                hash ^= RemainingCodenameClaims.GetHashCode();
            }
            if (buddyPokemon_ != null)
            {
                hash ^= BuddyPokemon.GetHashCode();
            }
            if (BattleLockoutEndMs != 0L)
            {
                hash ^= BattleLockoutEndMs.GetHashCode();
            }
            if (secondaryPlayerAvatar_ != null)
            {
                hash ^= SecondaryPlayerAvatar.GetHashCode();
            }
            return(hash);
        }
 public void MergeFrom(PlayerData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CreationTimestampMs != 0L)
     {
         CreationTimestampMs = other.CreationTimestampMs;
     }
     if (other.Username.Length != 0)
     {
         Username = other.Username;
     }
     if (other.Team != 0)
     {
         Team = other.Team;
     }
     tutorialState_.Add(other.tutorialState_);
     if (other.avatar_ != null)
     {
         if (avatar_ == null)
         {
             avatar_ = new global::POGOProtos.Data.Player.PlayerAvatar();
         }
         Avatar.MergeFrom(other.Avatar);
     }
     if (other.MaxPokemonStorage != 0)
     {
         MaxPokemonStorage = other.MaxPokemonStorage;
     }
     if (other.MaxItemStorage != 0)
     {
         MaxItemStorage = other.MaxItemStorage;
     }
     if (other.dailyBonus_ != null)
     {
         if (dailyBonus_ == null)
         {
             dailyBonus_ = new global::POGOProtos.Data.Player.DailyBonus();
         }
         DailyBonus.MergeFrom(other.DailyBonus);
     }
     if (other.equippedBadge_ != null)
     {
         if (equippedBadge_ == null)
         {
             equippedBadge_ = new global::POGOProtos.Data.Player.EquippedBadge();
         }
         EquippedBadge.MergeFrom(other.EquippedBadge);
     }
     if (other.contactSettings_ != null)
     {
         if (contactSettings_ == null)
         {
             contactSettings_ = new global::POGOProtos.Data.Player.ContactSettings();
         }
         ContactSettings.MergeFrom(other.ContactSettings);
     }
     currencies_.Add(other.currencies_);
     if (other.RemainingCodenameClaims != 0)
     {
         RemainingCodenameClaims = other.RemainingCodenameClaims;
     }
     if (other.buddyPokemon_ != null)
     {
         if (buddyPokemon_ == null)
         {
             buddyPokemon_ = new global::POGOProtos.Data.BuddyPokemon();
         }
         BuddyPokemon.MergeFrom(other.BuddyPokemon);
     }
     if (other.BattleLockoutEndMs != 0L)
     {
         BattleLockoutEndMs = other.BattleLockoutEndMs;
     }
 }