Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Result != 0)
            {
                hash ^= Result.GetHashCode();
            }
            if (PokedexNumber != 0)
            {
                hash ^= PokedexNumber.GetHashCode();
            }
            if (CombatPoints != 0)
            {
                hash ^= CombatPoints.GetHashCode();
            }
            if (PokemonId != 0UL)
            {
                hash ^= PokemonId.GetHashCode();
            }
            if (pokemonDisplay_ != null)
            {
                hash ^= PokemonDisplay.GetHashCode();
            }
            if (EncounterType != 0)
            {
                hash ^= EncounterType.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
 private PokemonForm(
     string name,
     GenerationId generationId,
     PokedexNumber speciesId,
     Height height,
     Weight weight,
     PokemonTypeId primaryTypeId,
     PokemonTypeId?secondaryTypeId = null,
     Url?imageUrl       = null,
     string?description = null,
     bool isDefault     = false) : base(name)
 {
     GenerationId = Guard.Against.Null(generationId, nameof(generationId));
     SpeciesId    = Guard.Against.Null(speciesId, nameof(speciesId));
     IsDefault    = isDefault;
     Height       = Guard.Against.Null(height, nameof(height));
     Weight       = Guard.Against.Null(weight, nameof(weight));
     ImageUrl     = imageUrl;
     Description  = description;
     UpdateTypes(primaryTypeId, secondaryTypeId);
 }
Esempio n. 3
0
 internal static PokemonForm CreateDefaultForm(
     string name,
     GenerationId generationId,
     PokedexNumber speciesId,
     Height height,
     Weight weight,
     PokemonTypeId primaryTypeId,
     PokemonTypeId?secondaryTypeId = null,
     Url?imageUrl       = null,
     string?description = null)
 {
     return(new PokemonForm(
                name,
                generationId,
                speciesId,
                height,
                weight,
                primaryTypeId,
                secondaryTypeId,
                imageUrl,
                description,
                true));
 }
Esempio n. 4
0
 public string ToStringSauvegarde()
 {
     return(PokedexNumber.ToString());
 }