Grover-c13/PokeGOAPI-Java

encounter.useItem always returns ACTIVE_ITEM_EXISTS

Qudyjac opened this issue · 2 comments

It is not possible to use berries when catching a pokemon.
encounter.useItem always returns ACTIVE_ITEM_EXISTS

You can check this with the CatchPokemonAtEreaExample

I changed line 178 from
encounter.useItem(ItemId.ITEM_RAZZ_BERRY);
to
System.out.println(encounter.useItem(ItemId.ITEM_RAZZ_BERRY).toString());
to get the result.

logic bug:
file: Encounter.java
line : 192
bug - if (activeItem == null) {
change to if (getActiveItem() == null) {

That did the trick, thx.
Now someone has to fix it in the repo.