Ejemplo 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);
        }
Ejemplo 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);
 }
Ejemplo 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));
 }
Ejemplo n.º 4
0
 public string ToStringSauvegarde()
 {
     return(PokedexNumber.ToString());
 }