Skip to content
Snippets Groups Projects
Commit e486927f authored by Jozef Bugos's avatar Jozef Bugos
Browse files

fixing team

parent 840021ce
No related branches found
No related tags found
No related merge requests found
...@@ -29,14 +29,14 @@ public class RiotController { ...@@ -29,14 +29,14 @@ public class RiotController {
for (MatchBean match : matches.getMatches()) { for (MatchBean match : matches.getMatches()) {
MatchDetailBean detail = getMatchDetail(server, match.getGameId()); MatchDetailBean detail = getMatchDetail(server, match.getGameId());
StatsBean[] statsBeans = new StatsBean[10]; StatsBean[] statsBeans = new StatsBean[10];
int userTeam = 100; int userTeam = 1;
boolean hasUserWon = false; boolean hasUserWon = false;
for (ParticipantBean participant : detail.getParticipantIdentities()) { for (ParticipantBean participant : detail.getParticipantIdentities()) {
if (participant.getPlayer().getAccountId().equals(userId)) { if (participant.getPlayer().getAccountId().equals(userId)) {
userTeam = participant.getParticipantId() <= 5 ? 1 : 2;
if (participant.getParticipantId() <= 5 && detail.getTeams()[0].getWin() if (participant.getParticipantId() <= 5 && detail.getTeams()[0].getWin()
|| participant.getParticipantId() > 5 && detail.getTeams()[1].getWin()) { || participant.getParticipantId() > 5 && detail.getTeams()[1].getWin()) {
hasUserWon = true; hasUserWon = true;
userTeam = participant.getParticipantId() <= 5 ? 1 : 2;
} }
// continue; // continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment