Skip to content

Commit

Permalink
Fix parameter order on lazy list call
Browse files Browse the repository at this point in the history
  • Loading branch information
stelar7 committed Dec 24, 2023
1 parent a061a8a commit a2b6221
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<String> getMatchList(RegionShard server, String puuid, GameQueueType
public LazyList<String> getMatchList(RegionShard server, String puuid)
{
int increment = 100;
return new LazyList<>(increment, prevValue -> getMatchList(server, puuid, null, null, prevValue, prevValue + increment, null, null));
return new LazyList<>(increment, prevValue -> getMatchList(server, puuid, null, null, prevValue + increment, increment, null, null));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,20 @@ public void testMatchInvalidSpellSlots() throws IOException
if (event.getType() == EventType.CHAMPION_KILL)
{
event.getVictimDamageReceived().forEach(d -> {
if (d.getSpellSlot() == SpellSlotType.INVALID || d.getSpellSlot() == SpellSlotType.UNDOCUMENTED || d.getSpellSlot() == SpellSlotType.UNUSED || d.getSpellSlot() == SpellSlotType.OUT_OF_BOUNDS)
if (d.getSpellSlot() == SpellSlotType.INVALID
|| d.getSpellSlot() == SpellSlotType.UNDOCUMENTED
|| d.getSpellSlot() == SpellSlotType.UNUSED
|| d.getSpellSlot() == SpellSlotType.OUT_OF_BOUNDS)
{
wierdEntries.add(d);
}
});

event.getVictimDamageDealt().forEach(d -> {
if (d.getSpellSlot() == SpellSlotType.INVALID || d.getSpellSlot() == SpellSlotType.UNDOCUMENTED || d.getSpellSlot() == SpellSlotType.UNUSED || d.getSpellSlot() == SpellSlotType.OUT_OF_BOUNDS)
if (d.getSpellSlot() == SpellSlotType.INVALID
|| d.getSpellSlot() == SpellSlotType.UNDOCUMENTED
|| d.getSpellSlot() == SpellSlotType.UNUSED
|| d.getSpellSlot() == SpellSlotType.OUT_OF_BOUNDS)
{
wierdEntries.add(d);
}
Expand Down Expand Up @@ -101,7 +107,7 @@ public void testMatchParticipantIds()
{
DataCall.setCacheProvider(new FileSystemCacheProvider());

Summoner sum = Summoner.byName(LeagueShard.EUW1, "stelar7");
Summoner sum = Summoner.byName(LeagueShard.EUW1, "stelar7");

MatchListBuilder builder = new MatchListBuilder();
builder = builder.withQueue(GameQueueType.TEAM_BUILDER_RANKED_SOLO);
Expand Down Expand Up @@ -154,6 +160,19 @@ public void testMatchListParams()
System.out.println();
}

@Test
public void testMatchListParameterOrder()
{

String puuid = Summoner.byName(LeagueShard.EUW1, "stelar7").getPUUID();
LazyList<String> matchList = r4J.getLoLAPI().getMatchAPI().getMatchList(LeagueShard.EUW1.toRegionShard(), puuid);
for (String s : matchList)
{
System.out.println(s);
}
System.out.println();
}

@Test
public void testMatchBadDuration()
{
Expand Down

0 comments on commit a2b6221

Please sign in to comment.