diff --git a/src/main/java/com/pokegoapi/api/map/pokemon/EvolutionResult.java b/src/main/java/com/pokegoapi/api/map/pokemon/EvolutionResult.java index a8863267..a27bc2a8 100644 --- a/src/main/java/com/pokegoapi/api/map/pokemon/EvolutionResult.java +++ b/src/main/java/com/pokegoapi/api/map/pokemon/EvolutionResult.java @@ -16,6 +16,7 @@ package com.pokegoapi.api.map.pokemon; import POGOProtos.Networking.Responses.EvolvePokemonResponseOuterClass; +import com.pokegoapi.api.PokemonGo; import com.pokegoapi.api.pokemon.Pokemon; public class EvolutionResult { @@ -23,9 +24,9 @@ public class EvolutionResult { private EvolvePokemonResponseOuterClass.EvolvePokemonResponse proto; private Pokemon pokemon; - public EvolutionResult(EvolvePokemonResponseOuterClass.EvolvePokemonResponse proto) { + public EvolutionResult(PokemonGo api, EvolvePokemonResponseOuterClass.EvolvePokemonResponse proto) { this.proto = proto; - this.pokemon = new Pokemon(proto.getEvolvedPokemonData()); + this.pokemon = new Pokemon(api, proto.getEvolvedPokemonData()); } public EvolvePokemonResponseOuterClass.EvolvePokemonResponse.Result getResult() { diff --git a/src/main/java/com/pokegoapi/api/pokemon/Pokemon.java b/src/main/java/com/pokegoapi/api/pokemon/Pokemon.java index fcc4f457..b9d4c0d4 100644 --- a/src/main/java/com/pokegoapi/api/pokemon/Pokemon.java +++ b/src/main/java/com/pokegoapi/api/pokemon/Pokemon.java @@ -137,7 +137,7 @@ public EvolutionResult evolve() throws LoginFailedException, RemoteServerExcepti return null; } - EvolutionResult result = new EvolutionResult(response); + EvolutionResult result = new EvolutionResult(pgo, response); pgo.getInventories().getPokebank().removePokemon(this);