Skip to content

Commit 1f79f38

Browse files
author
Matthew J. Mjelde
committed
Minor addition to fix for inventories and a fix for issue #136
1 parent 298b7ec commit 1f79f38

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/main/java/com/pokegoapi/api/inventory/Inventories.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public class Inventories {
4444
private PokeBank pokebank;
4545
@Getter
4646
private CandyJar candyjar;
47-
@Getter
48-
private PlayerStatsOuterClass.PlayerStats stats;
4947

5048
private long lastInventoryUpdate = 0;
5149

@@ -119,7 +117,7 @@ public void updateInventories(boolean forceUpdate) throws LoginFailedException,
119117
);
120118
}
121119
if (itemData.hasPlayerStats()) {
122-
stats = inventoryItem.getInventoryItemData().getPlayerStats();
120+
api.getPlayerProfile().setStats(inventoryItem.getInventoryItemData().getPlayerStats());
123121
}
124122

125123
lastInventoryUpdate = System.currentTimeMillis();

src/main/java/com/pokegoapi/api/player/PlayerProfile.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,26 @@
3737
public class PlayerProfile {
3838
private static final String TAG = PlayerProfile.class.getSimpleName();
3939
private final PokemonGo api;
40+
@Getter
4041
private long creationTime;
42+
@Getter
4143
private String username;
44+
@Getter
4245
private Team team;
46+
@Getter
4347
private int pokemonStorage;
48+
@Getter
4449
private int itemStorage;
50+
@Getter
4551
private EquippedBadgeOuterClass.EquippedBadge badge;
4652

53+
@Getter
4754
private PlayerAvatar avatar;
55+
@Getter
4856
private DailyBonus dailyBonus;
57+
@Getter
4958
private ContactSettings contactSettings;
59+
@Getter
5060
private Map<Currency, Integer> currencies = new HashMap<Currency, Integer>();
5161
@Getter
5262
@Setter

0 commit comments

Comments
 (0)