コード例 #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);
        }
コード例 #2
0
    //Method to create the user on datbase
    public void createUser(String email)
    {
        Debug.Log("Create user on DB");
        String id = accountRef.Push().Key;

        Debug.Log(reference);
        Debug.Log(reference.Child("users"));
        Debug.Log(id);
        Accounts acc = new Accounts(email, id);



        //reference.Child("villages").Child(key).Child("User").SetValueAsync(email);
        //vilRef.Child(id).Child("User").SetValueAsync(email);

        /*
         *  string json = JsonUtility.ToJson(user);
         *
         * mDatabaseRef.Child("users").Child(userId).SetRawJsonValueAsync(json);
         */
        String json = JsonUtility.ToJson(acc);

        accountRef.Child(id).SetRawJsonValueAsync(json);

        String     dailyBonusID = reference.Child("DailyBonus").Push().Key;
        DailyBonus dailyBon     = new DailyBonus(email, dailyBonusID);

        json = JsonUtility.ToJson(dailyBon);
        reference.Child("DailyBonus").Child(dailyBonusID).SetRawJsonValueAsync(json);
    }
コード例 #3
0
ファイル: PlayerData.cs プロジェクト: StanleyLux/Catchem-PoGo
        public override int GetHashCode()
        {
            int hash = 1;

            if (CreationTimestampMs != 0L)
            {
                hash ^= CreationTimestampMs.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Team != global::POGOProtos.Enums.TeamColor.Neutral)
            {
                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();
            }
            return(hash);
        }
コード例 #4
0
ファイル: PlayerData.g.cs プロジェクト: gandoulf0/RocketBot
        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();
            return(hash);
        }
コード例 #5
0
ファイル: PlayerData.g.cs プロジェクト: plan291037/POGOProtos
 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;
     }
 }