Search in sources :

Example 11 with LOLMatch

use of no.stelar7.api.r4j.pojo.lol.match.v5.LOLMatch in project L4J8 by stelar7.

the class MatchListV5Test method testMatchParticipantIds.

@Test
@Disabled
public void testMatchParticipantIds() {
    DataCall.setCacheProvider(new FileSystemCacheProvider());
    MatchListBuilder builder = new MatchListBuilder();
    Summoner sum = Summoner.byName(LeagueShard.EUW1, "fckmuffin");
    LazyList<String> all = sum.getLeagueGames().getLazy();
    MatchBuilder mb = new MatchBuilder(sum.getPlatform());
    TimelineBuilder tb = new TimelineBuilder(sum.getPlatform());
    for (String matchid : all) {
        tb = tb.withId(matchid);
        mb = mb.withId(matchid);
        LOLMatch match = mb.getMatch();
        LOLTimeline lolTimeline = tb.getTimeline();
        List<TimelineDamageData> wierdEntries = new ArrayList<>();
        lolTimeline.getFrames().forEach(frame -> {
            frame.getParticipantFrames().forEach((k, v) -> {
                if (!k.equals(String.valueOf(v.getParticipantId()))) {
                    System.out.println(matchid + " has mismatched participantid and key");
                }
            });
        });
    }
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) FileSystemCacheProvider(no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider)

Aggregations

Summoner (no.stelar7.api.r4j.pojo.lol.summoner.Summoner)10 SummonerBuilder (no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder)6 FileSystemCacheProvider (no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider)5 R4J (no.stelar7.api.r4j.impl.R4J)5 LeagueShard (no.stelar7.api.r4j.basic.constants.api.regions.LeagueShard)4 MatchListBuilder (no.stelar7.api.r4j.impl.lol.builders.matchv5.match.MatchListBuilder)4 StaticChampion (no.stelar7.api.r4j.pojo.lol.staticdata.champion.StaticChampion)4 java.util (java.util)3 DataCall (no.stelar7.api.r4j.basic.calling.DataCall)3 no.stelar7.api.r4j.pojo.lol.match.v5 (no.stelar7.api.r4j.pojo.lol.match.v5)3 SecretFile (no.stelar7.api.r4j.tests.SecretFile)3 java.awt (java.awt)2 AffineTransform (java.awt.geom.AffineTransform)2 java.awt.image (java.awt.image)2 java.io (java.io)2 URL (java.net.URL)2 List (java.util.List)2 Predicate (java.util.function.Predicate)2 IntStream (java.util.stream.IntStream)2 ImageIO (javax.imageio.ImageIO)2