Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added playerTeamType to MatchHistoryEntry, so that it contains which side the player was on #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/com/achimala/leaguelib/models/MatchHistoryEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class MatchHistoryEntry implements PlayerList {
private Date _createDate;
private LeagueMatchmakingQueue _queue;
private List<LeagueSummoner> _playerTeam, _enemyTeam;
private TeamType _playerTeamType;
private Map<Integer, LeagueChampion> _playerChampionSelections;
private Map<MatchHistoryStatType, Integer> _stats;

Expand All @@ -55,6 +56,7 @@ public MatchHistoryEntry(TypedObject obj, LeagueSummoner primarySummoner) {
_playerChampionSelections.put(primarySummoner.getId(), LeagueChampion.getChampionWithId(obj.getInt("championId")));

int playerTeamId = obj.getInt("teamId");
_playerTeamType = TeamType.getFromId(playerTeamId);

// Riot doesn't include this person in the "fellow players" list, which I suppose makes sense
_playerTeam.add(primarySummoner);
Expand Down Expand Up @@ -116,6 +118,10 @@ public LeagueMatchmakingQueue getQueue() {
return _queue;
}

public TeamType getPlayerTeamType() {
return _playerTeamType;
}

public List<LeagueSummoner> getPlayerTeam() {
return _playerTeam;
}
Expand Down