public override int GetHashCode()
        {
            int hash = 1;

            if (Result != 0)
            {
                hash ^= Result.GetHashCode();
            }
            if (PokemonId != 0)
            {
                hash ^= PokemonId.GetHashCode();
            }
            if (Latitude != 0D)
            {
                hash ^= Latitude.GetHashCode();
            }
            if (Longitude != 0D)
            {
                hash ^= Longitude.GetHashCode();
            }
            if (EncounterLocation.Length != 0)
            {
                hash ^= EncounterLocation.GetHashCode();
            }
            if (EncounterId != 0UL)
            {
                hash ^= EncounterId.GetHashCode();
            }
            if (DisappearTimestampMs != 0L)
            {
                hash ^= DisappearTimestampMs.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
        public int GetRate(EncounterLocation l)
        {
            switch (l)
            {
            case EncounterLocation.Grass:
                return(EncounterRateGrass);

            case EncounterLocation.Water:
                return(EncounterRateWater);

            default:
                throw new ArgumentOutOfRangeException(nameof(l), l, null);
            }
        }
Esempio n. 3
0
        static string ToString(EncounterLocation l)
        {
            switch (l)
            {
            case EncounterLocation.Grass:
                return("g");

            case EncounterLocation.Water:
                return("w");

            default:
                throw new ArgumentOutOfRangeException(nameof(l), l, null);
            }
        }
Esempio n. 4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Result != 0)
            {
                hash ^= Result.GetHashCode();
            }
            if (PokemonId != 0)
            {
                hash ^= PokemonId.GetHashCode();
            }
            if (Latitude != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Latitude);
            }
            if (Longitude != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Longitude);
            }
            if (EncounterLocation.Length != 0)
            {
                hash ^= EncounterLocation.GetHashCode();
            }
            if (EncounterId != 0UL)
            {
                hash ^= EncounterId.GetHashCode();
            }
            if (DisappearTimestampMs != 0L)
            {
                hash ^= DisappearTimestampMs.GetHashCode();
            }
            if (pokemonDisplay_ != null)
            {
                hash ^= PokemonDisplay.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }