PokeGOAPI-Java
PokeGOAPI-Java copied to clipboard
catchPokemon() always use razzberry item
Description: catchPokemon() always use razzberry item, even if I check that limit is 0
Steps to reproduce: pokemon.catchPokemon(ball, 3, 0);
Expected behavior: Max attemps = 3 Max allow razzberry = 0
Actual behavior: Max attemps = 0 Max allow razzberry = -1 //unlimited
Solution: CatchablePokemon.java:267
public CatchResult catchPokemon(Pokeball pokeball, int amount, int razberryLimit)
throws LoginFailedException, RemoteServerException {
return catchPokemon(1.0, 1.95 + Math.random() * 0.05,
0.85 + Math.random() * 0.15, pokeball, razberryLimit);
}
change to:
public CatchResult catchPokemon(Pokeball pokeball, int amount, int razberryLimit)
throws LoginFailedException, RemoteServerException {
return catchPokemon(1.0, 1.95 + Math.random() * 0.05,
0.85 + Math.random() * 0.15, pokeball, amount, razberryLimit);
}